Monday, February 28, 2011

Cannot remove an entity that has not been attached.

You will not be able to use attach on a context other then the original context the item was received on unless the entity has been serialized.


public bool deleteslabrecord(TSummeryReport deletetsr)
{
EntityManager.TSummeryReports.DeleteOnSubmit(EntityManager.TSummeryReports.Single(theItem=>theItem==deletetsr));
return SaveChanges();
} 

No comments:

Post a Comment

How to Create Events Using Microsoft Graph API with Delegated Permissions and MSAL.js

Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...