ManyArticle
Http://bbs.winos.cn/thread-91036-1-1.html
I will not discuss it here
This article describes how to use parameters to generate referenced files by using LINQ.
The parameter is used when the spmetal tool under C:/program files/common files/Microsoft shared/Web Server Extensions/14/bin is used to generate a list object file.
For example
Spmetal/Web: http: // localhost/parameters: parameters. xml/language: CSHARP/code: entities. CS
The XML file that references parameter is mainly because we can configure the list that I want to read in this file, if no parameter is added, all lists and content types on the website are read.
The format of the parameter. xml file is as follows:
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <web class = "entities" accessmodifier = "public" <br/> xmlns = "http://schemas.microsoft.com/SharePoint/2009/spmetal"> <br/> <list name = "linqtosharepoint" member =" linqtosharepoint "> <br/> <contenttype name =" item "class =" linqtosharepoint "> <br/> <column name =" title "member =" title "/> <br /> <excludeothercolumns/> <br/> </contenttype> <br/> </List> <br/> <excludeotherlists/> <br/> </Web> <br />
The class in the Web node is the class file name generated by spmetal.
The list node reads the list.
The content type of the contenttype node that reads the list. Specifically, name indicates the content type.
Column is the name of the read field.
After these parameters are set, you can run the spmetal command.
The generated entities. CS file only contains the list you need.