Using SPMETAL to create entities

Create a batch file:

SET SPMETAL=”C:\PROGRAM FILES\COMMON FILES\MICROSOFT SHARED\WEB SERVER EXTENSIONS\14\BIN\SPMETAL.EXE” %SPMETAL% /web:http://localhost /namespace:yourNameSpace /code:yourCode.cs /user:yourUserName /password:yourPassword

Pause

Run the batch file and it will generate a “yourCode.cs” file in your current folder.

Include this cs file into your project, then add reference to “Microsoft.SharePoint.linq”

Advertisements
This entry was posted in LINQ to SharePoint, SharePoint 2010. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s