I use entity framework with Visual Studio 2008, sure it was SP1 both .NET Framework and VS itself. My application is develop in n-tier environment. First step I convert data from context to collection and serialize to user.
HRMSDBContext context = new HRMSDBContext();
List<InHouseTrainingHead> heads = context.InHouseTrainingHead.ToList<InHouseTrainingHead>();
foreach (InHouseTrainingHead head in heads)
{
context.Detach(head);
}
return heads;
After user changes some data and click save then this list return to save method.
HRMSDBContext context = new HRMSDBContext();
foreach (InHouseTrainingHead head in lists)
{
context.Attach(head);
context.ApplyPropertyChanges(head.EntityKey.EntitySetName, head);
}
context.SaveChanges();
Unfortunately after SaveChanges() nothing happen. How can I solve this problem?
Thanks