Esempio n. 1
0
 public static Equipment UpdateEquipmentMap(EquipmentToUpdateDto equipmentToUpdate, Guid companyId)
 {
     return(new Equipment
     {
         Id = equipmentToUpdate.EquipmentId,
         Name = equipmentToUpdate.Name,
         Status = equipmentToUpdate.Status,
         StatusDate = equipmentToUpdate.StatusDate,
         SoldierId = equipmentToUpdate.SoldierId,
         CompanyId = companyId
     });
 }
Esempio n. 2
0
 public async Task UpdateEquipment(EquipmentToUpdateDto equipmentToUpdate)
 {
     var companyId = (Guid)_soldierRepository.GetById(equipmentToUpdate.SoldierId).Result.CompanyId;
     await _equipmentRepository.UpdateEquipment(
         EquipmentMapper.UpdateEquipmentMap(equipmentToUpdate, companyId));
 }
Esempio n. 3
0
        public async Task <ActionResult> UpdateEquipment([FromBody] EquipmentToUpdateDto equipmentToUpdate)
        {
            await _equipmentService.UpdateEquipment(equipmentToUpdate);

            return(Ok());
        }