public int ItemtempAdd(mItemTemp itemtemp) { Itemtemp newitem = new Itemtemp(); itemtemp_repo.Add(itemtemp.ToDb(newitem)); SubmitChanges(); return newitem.id; }
public Itemtemp ToDb(Itemtemp db) { if (!string.IsNullOrEmpty(Name)) db.name = Name; if (!string.IsNullOrEmpty(ToHtml)) db.toHtml = ToHtml; if (!string.IsNullOrEmpty(Props)) db.props = Props; db.act = (int)Act; return db; }
public mItemTemp(Itemtemp it) { Id = it.id; Act = (eAct)it.act; Name = it.name; ToHtml = it.toHtml; Props = it.props; }
partial void DeleteItemtemp(Itemtemp instance);
partial void UpdateItemtemp(Itemtemp instance);
partial void InsertItemtemp(Itemtemp instance);