public int SelpropAdd(mSelprop prop) { Selprop newprop = new Selprop(); prop_repo.Add(prop.ToDb(newprop)); SubmitChanges(); return newprop.id; }
partial void DeleteSelprop(Selprop instance);
partial void UpdateSelprop(Selprop instance);
partial void InsertSelprop(Selprop instance);
public mSelprop(Selprop p) { Id = p.id; Act = (eAct)p.act; Name = p.name; ClassName = p.className; PropType = (eSelpropType)p.type; }
public Selprop ToDb(Selprop db) { if (!string.IsNullOrEmpty(Name)) db.name = Name; if (!string.IsNullOrEmpty(ClassName)) db.className = ClassName; db.act = (int)Act; db.type = (int)PropType; return db; }