public async Task <ActionResult <EquipmentModel[]> > GetAll(int employeeId) { try { var results = await _repository.GetAllEquipmentsAsync(employeeId); return(_mapper.Map <EquipmentModel[]>(results)); } catch (Exception) { return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Failure")); } }
public async Task <List <EquipmentDto> > GetAllEquipment() { var request = await _equipment.GetAllEquipmentsAsync(); return(request); }