EntryEntities.Attach
Posted: Thu 24 Sep 2009 11:45
Is it possible to Attach objects to contexts?
context.EntryEntities.Attach(entity, true);
??
context.EntryEntities.Attach(entity, true);
??
Discussion forums for open issues and questions concerning database tools, data access components and developer tools from Devart
https://forums.devart.com/
Code: Select all
private void MainMethod () {
Customer c = getFirst();
c.Name = "Test";
DataContext1.DataContext1 context = new DataContext1.DataContext1();
context.Customers.Attach(c, true);
context.SubmitChanges();
}
private Customer getFirst () {
using (DataContext1.DataContext1 context = new DataContext1.DataContext1())
{
Customer c = db.Customers.First();
return c;
}
}
where can i set this property "IsVersion" ?AndreyR wrote:As I have already mentioned, the entity should have a Version member.
Please set the IsVersion property to true for the property you wish to use as version in Entity Developer.
Please don't forget the database triggers on insert and update actions.