public bool UpdateEntity(Model.Models.TCodeTable entity) { context.Entry(entity).State = EntityState.Modified; return(context.SaveChanges() > 0 ? true : false); }
public Model.Models.TCodeTable AddEntity(Model.Models.TCodeTable entity) { context.Entry(entity).State = EntityState.Added; return(context.SaveChanges() > 0 ? entity : null); }