public void Update(Task task) { var original = _dbContext.Task.FirstOrDefault(x => x.Id == task.Id); if(original == null) return; original.ProofUrl = task.ProofUrl; original.TaskStatus = task.TaskStatus; original.IsDeleted = task.IsDeleted; original.WasRejected = task.WasRejected; original.InReviewDate = task.InReviewDate; _dbContext.SaveChanges(); }
public void Save(Task task) { _dbContext.Task.Add(task); _dbContext.SaveChanges(); }