LINQ4SP – Create new list item

Well, we can query our SharePoint lists with LINQ4SP, that's great.

But what about data manipulation? Can we create, modifiy or delete items as well? My answer is: yes, we can! We are able to create new item, modify or delete items with LINQ4SP!

First of all, let's see an item creation: we'll insert a new Product item to our Products list. This list is migrated from AdwentureWorks database, with some other tables. We don't need the whole AdwentureWorks database for our demos, so we migrate only a few tables, as you can see on the following schema. One special thing is, that we don't have ProductVendor list, but it't just represented by a multi-lookup field between Vendor and Product lists (of course, with no additional fields).

   

So, in this demo I'll show you how to insert a new Product into the SharePoint list. Are you ready? Click here for video… 

Leave a Reply