This is a message shown when using old method to Add objects to entity.
The old way (deprecated) of inserting a new record to database using Entity object was as below:
using (Entities entities = new Entities(entityConnStr))
{
//....
//.....
entities.AddToMyTable1(myTableObject);
entities.SaveChanges();
}
New way to Insert/Add records is as below:
using (Entities entities = new Entities(entityConnStr))
{
//....
//.....
entities.AddObject("MyTable1",myTableObject);
entities.SaveChanges();
}
No comments:
Post a Comment