public IActionResult UpdateEmployee(string shelterId, string employeeId, [FromBody] Shelter.shared.Employee employee) { employee.Id = employeeId; employee.ShelterId = shelterId; _dataAccess.UpdateEmployee(shelterId, employeeId, employee); return(Ok(employee)); }
public void UpdateEmployee(string shelterId, string employeeId, Shelter.shared.Employee employee) { _context.Employees.ReplaceOne(x => x.ShelterId == shelterId && x.Id == employeeId, employee); }