В EF вы можете использовать состояние объекта, в Cool storage это было свойство isnew
, но в iridium я не могу найти ни свойство, ни состояние объекта.
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.?
}
}