internal async Task <bool> ModifyStatusEntry(StatusEntry StatusEntry) { _context.Entry(StatusEntry).State = EntityState.Modified; try { await _context.SaveChangesAsync(); return(true); } catch (DbUpdateConcurrencyException) { if (!StatusEntryExists(StatusEntry.Id)) { return(false); } else { throw; } } }
internal async Task <bool> ModifyEmployee(Employee employee) { _context.Entry(employee).State = EntityState.Modified; try { await _context.SaveChangesAsync(); return(true); } catch (DbUpdateConcurrencyException) { if (!EmployeeExists(employee.Id)) { return(false); } else { throw; } } }