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.
C#.NET Programming

Avatar of undefined
Last Comment
Kamal Khaleefa

8/22/2022 - Mon
Kamal Khaleefa

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
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
Kamal Khaleefa

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Your help has saved me hundreds of hours of internet surfing.
fblack61