zoukankan      html  css  js  c++  java
  • LINQ To SharePint 缺失Created By/Modified By 字段

    微软你做事能细心点吗?

    使用Linq to SharePoint,结果产生出来的实体类,居然找不到创建者、修改者这样的字段。要么说默认自带的这些字段都找不到就算了,可是版本、路径这些垃圾字段倒显示出来。

    只有再琢磨一番。

    找到Item 这个类,添加以下代码

    string _CreatedBy;
    [Microsoft.SharePoint.Linq.ColumnAttribute(Name = "Author", Storage = "_CreatedBy", ReadOnly = true, FieldType = "User", IsLookupValue = true)]
    public string CreatedBy
    {
    get { return this._CreatedBy; }
    set {
    if ((value != this._CreatedBy))
    {
    this.OnPropertyChanging("CreatedBy", this._CreatedBy);
    this._CreatedBy = value;
    this.OnPropertyChanged("CreatedBy");
    }
    }
    }

    修改者的字段可以类似的修改下。

  • 相关阅读:
    登录认证,全选,反选
    jQuery基础知识
    jQuery
    js练习
    BOM DOM
    mysql视图
    用CrwalSpider爬取boss直聘
    设置piplines.py数据管道
    在middlewares.py文件里添加代理ip
    爬取豆瓣电影
  • 原文地址:https://www.cnblogs.com/windy2008/p/2299752.html
Copyright © 2011-2022 走看看