public async Task CreateEmployeeAsync(EmployeeBiodata employee) { if (employee is null) { throw new ArgumentNullException(nameof(employee)); } await context.EmployeeBiodatas.AddAsync(employee); }
public async Task DeleteEmployeeAsync(EmployeeBiodata employee) { var employeeToDelete = await context.EmployeeBiodatas.FindAsync(employee.EmployeeId); if (employeeToDelete is null) { throw new ArgumentNullException(nameof(employee)); } context.EmployeeBiodatas.Remove(employee); }