Link to home
Start Free TrialLog in
Avatar of Yampolka
Yampolka

asked on

Can I update my datagrid DataContext without saving changes unless I really want to do it.?

I have a problem when I add an entity object with
ObjectContext.AddObject method because I can't
retrieve that object with LINQ querying my
ObjectContext.Person entities. I know that this
new added object is stored somewhere, because it
is used to update database after SaveChanges
method. That's bothers me because I want to
update my datagrid DataContext without saving
changes unless I really want to do it. It doesn't
help if I add the same object to DataContext list myself directly.
Avatar of Kamal Khaleefa
Kamal Khaleefa
Flag of Kuwait image

try to use a session or temporary object to store all ur data to it

then when u clck on some button save ur dataa to the data base
Avatar of Yampolka
Yampolka

ASKER

Supposing  entity Customers  bind to the grid  and user added one  Customer   to the  to the  Customers
Can I do something to let user see new Customer in Customers entity and undo the operation without hitting the database?.
ASKER CERTIFIED SOLUTION
Avatar of Kamal Khaleefa
Kamal Khaleefa
Flag of Kuwait image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial