public void AddClassification(DFClass rec) { if (rec.Id == Guid.Empty) { WriteLog(VMGlobal.LOG_ACTION.SAVE, string.Format("Classification: {0}", rec.Name), AccountId); context.DFClasses.Add(rec); return; } WriteLog(VMGlobal.LOG_ACTION.UPDATE, string.Format("{0}", rec.Name), this.AccountId); context.Entry(rec).State = EntityState.Modified; }
public void DeleteClassification(DFClass rec) { context.DFClasses.Remove(rec); }