public async Task <bool> AddAsync(core.Completion Completion) { if (await CompletionExists(Completion.UNITID)) { return(false); } var newCompletion = Completion.ToDataObject(); _context.Completion.Add(newCompletion); return(_context.ChangeTracker.HasChanges()); }
public async Task <bool> UpdateAsync(core.Completion Completion) { if (!await CompletionExists(Completion.UNITID)) { return(false); } var upCompletion = Completion.ToDataObject(); _context.Completion.Update(upCompletion); _context.Update(upCompletion); return(_context.ChangeTracker.HasChanges()); }