Пример #1
0
        public async Task <IActionResult> AddNewEquipment([FromBody] CreateEquipmentCommand createEquipmentCommand)
        {
            Logger.LogInformation("Sending command: {CommandName} - {IdProperty}: ({@Command})",
                                  createEquipmentCommand.GetGenericTypeName(), nameof(createEquipmentCommand), createEquipmentCommand);

            var equipmentId = await Mediator.Send(createEquipmentCommand);

            return(StatusCode(StatusCodes.Status201Created, equipmentId));
        }