属性的顺序是否重要?
这是:
[Serializable]
[DataContract(Name = "GuUser")]
[TSF.Attributes.Entity(
ConnectionKey = "usergroup",
TableName = "gu_user",
InsertCommand = "usp_gu_addguuser",
UpdateCommand = "usp_gu_updateguuser",
DeleteCommand = "usp_gu_deleteguuser",
SelectCommand = "usp_gu_getguuser")]
public class User : TSF.Base.BaseEntity
与此相同:
[DataContract(Name = "GuUser")]
[TSF.Attributes.Entity(
ConnectionKey = "usergroup",
TableName = "gu_user",
InsertCommand = "usp_gu_addguuser",
UpdateCommand = "usp_gu_updateguuser",
DeleteCommand = "usp_gu_deleteguuser",
SelectCommand = "usp_gu_getguuser")]
[Serializable]
public class User : TSF.Base.BaseEntity
第二种方式说“不可序列化”。我不能尝试第一种方式。也许错误与此无关。但是,订单是否重要?
答案 0 :(得分:1)
在这样的列表中指定属性的顺序,以及附加到同一程序实体的部分的顺序并不重要。
例如,属性规范[A] [B],[B] [A],[A,B]和[B,A]是等效的。
来源:http://msdn.microsoft.com/en-us/library/aa664616(v=vs.71).aspx