WPF and LINQ to Entities binding to newly added records


I'm in the process of learning LINQ to Entities and WPF so forgive me if I get some terminology wrong. I have a model which contains Clients and I want the user to be able to bulk enter up to 20 clients at a time (this will be done by data entry staff off a paper list so I want to avoid entering one and saving one).

I was planning on adding 20 new clients to my model and have a datagrid/listbox bound to this.

In LINQ, how do I select out the newly added records to the model? I could rely on certain fields being blank but is there a better method? Alternatively, is there another way of doing this?

Best Solution

DataContext db; // ...

The change set will contain lists of newly insert, update and delete operations. If you access that prior to any SubmitChanges you should be able to get what you want. However LINQ does preform inserts in a transactional manner so what is it that you wanna achieve here?