public decimal AddForm(T_FORM form) { using (var ctx = new OAContext()) { ctx.T_FORM.Add(form); return ctx.SaveChanges(); } }
public decimal UpdateForm(T_FORM form) { using (var ctx = new OAContext()) { ctx.T_FORM.Attach(form); ctx.Entry<T_FORM>(form).State = System.Data.EntityState.Modified; return ctx.SaveChanges(); } }
public decimal UpdateForm(T_FORM form) { return _ctrl.UpdateForm(form); }
public decimal AddForm(T_FORM form) { return _ctrl.AddForm(form); }