public void CreateItem(DemoWFInfo i) { using (IDataContext ctx = DataContext.Instance()) { var rep = ctx.GetRepository <DemoWFInfo>(); rep.Insert(i); } }
public DemoWFInfo GetItem(int itemId, int moduleId) { DemoWFInfo i = null; using (IDataContext ctx = DataContext.Instance()) { var rep = ctx.GetRepository <DemoWFInfo>(); i = rep.GetById(itemId, moduleId); } return(i); }