在EF中,您可以使用对象状态,在凉爽的存储中,它是属性isnew
,但是在铱中,我找不到属性或对象状态。
public class DataManager
{
public static MyContext DbContext = new MyContext();
public class MyContext: SqlServerContext
{
public MyContext(): base("database") {}
internal IDataset<Goodies> Goodies;
}
}
public class Goodies: IEntity
{
[Column.PrimaryKey]
public Int64 GoodiesID { get; set; }
public string Description { get; set; }
public bool InWebshop()
{
// Only new goodies aren't in the webshop
return this.?
}
}