Introduction:
In this article we will discuss about the SPMetal and also how to use SPMetal in SharePoint 2010. Also you can visit article on LINQ to SharePoint 2010.
Details:
SPMetal is a command-line tool that generates entity classes. These classes are primarily used in LINQ to SharePoint queries. The classes it generates are partial, so you can add members to them in separate, manually created, code files.
SPMetal comes in SharePoint 2010 and it founds in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\BIN.
By using this you can generate a code file that contains classes for your objects in a specific site.
This will include a data context object, along with objects for all of your list level content types.
All the objects are strongly typed objects.
Syntax:
SpMetal.exe -url: -list:
In this article we will discuss about the SPMetal and also how to use SPMetal in SharePoint 2010. Also you can visit article on LINQ to SharePoint 2010.
Details:
SPMetal is a command-line tool that generates entity classes. These classes are primarily used in LINQ to SharePoint queries. The classes it generates are partial, so you can add members to them in separate, manually created, code files.
SPMetal comes in SharePoint 2010 and it founds in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\BIN.
By using this you can generate a code file that contains classes for your objects in a specific site.
This will include a data context object, along with objects for all of your list level content types.
All the objects are strongly typed objects.
Syntax:
SpMetal.exe -url:
- [-out:
[-user:
-url:
-list:
- Name of the list
-out:
-language:
(Default: CS)
-user:
-password:
-domain:
Ex. SPMetal /web:http://SiteName/SubSiteName /code:FileName.cs
Also you check some good SharePoint Tools.