确定记录是新记录还是现有记录

时间:2019-06-25 13:12:13

标签: c# orm iridium

在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.?
    }
}

0 个答案:

没有答案