L&M Solutions

Your SharePoint consultant
Home     LINQ4SP     About Us     Contact Us     Site Map      
Demo
Posts, articles
Download
LINQ4SP Introduction

Code generator
First of all, I'll show you how you can browse your site's content, and select what you want to use in the generated code. You can select lists, columns, lookups, etc. After finishing the selection, you can open and use the source file. If you want to see, how does it work, click here for a short demo.

Simple query

This time I would like to go through and easy query generation and some basic filtering.

First we generated the context from a SharePoint list and created a test project. This is, where the current video starts...

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...

Create a new list item with a lookup

What would you tell, if I show you a newer interesting thing? Are you ready? - OK, today surprise is how to insert a lookup reference to another list: just see this short demo...


Delete a list item
In the next part I'll show you how to delete an item from a list.