//private void LogChange(int userId, ThingAction action) //{ // var log = new ThingLog(userId, this.Id); // log.Action = action; // this.History.Add(log); //} private void LogChange(User user, ThingAction action) { var log = new ThingLog(user, this); log.Action = action; this.History.Add(log); }
public void Delete(ThingLog log) { log.Action = ThingAction.Deleted; this.IsDeleted = true; this.Status = ThingStatus.Deleted; this.History.Add(log); }
public void UpdateStatus(int userId, ThingStatus status) { var log = new ThingLog(userId, this.Id); log.Action = (status == ThingStatus.Completed) ? ThingAction.Completed : ThingAction.StatusChanged; this.Status = status; this.History.Add(log); }
private void Complete(ThingLog log) { log.Action = ThingAction.Completed; this.Status = ThingStatus.Completed; this.History.Add(log); }