public bool SaveDetail(WorkingDefine data) { try { entity.WorkingDefines.Add(data); entity.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public dynamic UpdateDetail(WorkingDefine data) { try { entity.WorkingDefines.Add(data); entity.Entry(data).State = System.Data.Entity.EntityState.Modified; entity.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }