Inserting into a Table with LINQ to SQL
While creating a little project, I wanted to know how to insert an object into a table using LINQ to SQL. Using Intellisense it wasn’t obvious at all.
Scott Guthrie wrote a post on how do it. Unfortunately, the method name has changed since he did it, so you need to call InsertOnSubmit on the Table instead of Add, as he described it.
Phew! Getting that far was hard enough!
This is my personal blog, where I express my thoughts and thinking about programming and software development.
Moulde
11 Jul, 2008
Thanks ALOT
I couldnt get the add thing to work, and ive been surfing for a solution for hours now..