public void Update(TraceLog model) { var target = Find(model.ID); db.Attach<TraceLog>(target); target.CompanyID = model.CompanyID; target.Content = model.Content; db.Commit(); }
public TraceLog Create(ViewModels.TraceLogViewModel model) { TraceLog entity = new TraceLog(); entity.AddTime = DateTime.Now; entity.AddUser = CookieHelper.MemberID; entity.CompanyID = model.CompanyID; entity.Content = model.Content; entity.RelationID = model.RelationID; db.Add<TraceLog>(entity); db.Commit(); return entity; }
public void Delete(TraceLog model) { var target = Find(model.ID); db.Remove<TraceLog>(target); db.Commit(); }
public void Create(TraceLog model) { db.Add<TraceLog>(model); db.Commit(); }