首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web Service >

高手请献身, 关于实体发布wcf数据库服务的有关问题

2012-02-08 
高手请献身, 关于实体发布wcf数据库服务的问题/// summary/// 属性值集合(JSON格式)/// /summary[Desc

高手请献身, 关于实体发布wcf数据库服务的问题
/// <summary>
  /// 属性值集合(JSON格式)
  /// </summary>
  [DescriptionAttribute("属性值集合")]
  [CategoryAttribute("非查询")]  
  [Property(Type = "StringClob")]
  [Column(1, SqlType = "text", Name = "attributes")]
   
  public String Attributes
  {
  get;
  set;
  }

上边是一实体的属性,发布WCF 数据服务, 用客户端更新下来的
References.cs 里面变成

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
  public string Attributes
  {
  get
  {
  return this._Attributes;
  }
  set
  {
  this.OnAttributesChanging(value);
  this._Attributes = value;
  this.OnAttributesChanged();
  this.OnPropertyChanged("Attributes");
  }
  }

问题是:有办法把属性里的 [DescriptionAttribute("属性值集合")]
 也发布出去, 让客户端能访问的到吗?

[解决办法]
你要求与wcf无关,根本排不上日程。
[解决办法]
估计只能你自己写代码了。

soap message中参数的描述是像这样的

<xs:element minOccurs="0" name="FirstName" nillable="true" type="xs:string" /> 

而xs:element可用的属性中没有类似description的东西。
参考:http://www.w3schools.com/schema/el_element.asp

热点排行