ServiceStack.OrmLite如何按属性忽略属性
我正在尝试使用ServiceStack.OrmLite。我同时使用ReferenceKey(CityId)和Reference(City)。ReferenceKey用于创建数据库,Reference用于在我的代码中使用对象。IgnoreAttribute。。经过测试,它可以工作。尝试ServiceStack.OrmLite如何按属性忽略属性,orm,servicestack,Orm,servicestack,我正在尝试使用ServiceStack.OrmLite。我同时使用ReferenceKey(CityId)和Reference(City)。ReferenceKey用于创建数据库,Reference用于在我的代码中使用对象。IgnoreAttribute。。经过测试,它可以工作。尝试[IgnoreDataMember]属性 此属性将告诉ServiceStack库忽略此属性。[ignore]将从OrmLite忽略,[IgnoreDataMember]将从序列化程序忽略 public class U
[IgnoreDataMember]
属性
此属性将告诉ServiceStack库忽略此属性。[ignore]将从OrmLite忽略,[IgnoreDataMember]将从序列化程序忽略
public class User
{
public long Id {get;set;}
[References(typeof(City))]
public long CityId {get;set;}
[????]
public City {get;set;}
}