Sharepoint学习笔记---Linq to Sharepoint--另一种生成Entity classes for sharepoint site的方法...

 通常我们可以用SPMetal命令行方式来生成Sharepoint site的Entity classes。这种方式具有很强的灵活性。但Visual Studio2010也为我们提供了另一种简单快捷的图形界面方式来生成Entity classes。
1、首先你要下载CKS Visual Studio Extension。你可以下载The extension for SharePoint Server or for SharePoint Foundation两个版本的Kit。

     请从此处下载The extension for SharePoint Server

     请从此处下载The extension for SharePoint Foundation

 2、使用CKS来生成Entity classes from SharePoint site。
   在你安装了上面的CKS工具后,请打一个项目,然后打开Server Explorer,在Server Explorer中新建一个连接到你调试的Sharepoint网站上。如下图
Sharepoint学习笔记---Linq to Sharepoint--另一种生成Entity classes for sharepoint site的方法...

 

输入你要建立连接的Sharepoint网站地址

Sharepoint学习笔记---Linq to Sharepoint--另一种生成Entity classes for sharepoint site的方法...

  然后选择此网站,右击鼠标,在弹出的菜单中选择Generate entity classes。

Sharepoint学习笔记---Linq to Sharepoint--另一种生成Entity classes for sharepoint site的方法...

于是我们就可以在Solution的相关目录下找到CKS为我们生成的EntityClasses

Sharepoint学习笔记---Linq to Sharepoint--另一种生成Entity classes for sharepoint site的方法...

 

转载于:https://www.cnblogs.com/wsdj-ITtech/archive/2011/11/02/2232418.html