Пример #1
0
        public async Task <IActionResult> AgregarCliente(MCliente cli)
        {
            try
            {
                var cliAgregar = _mapper.Map <MCliente, Clientes>(cli);

                await _clientesRepository.AgregarClienteAsync(cliAgregar);

                await _unitOfWork.CompleteAsync();

                return(Ok());
            }
            catch (Exception e)
            {
                return(StatusCode(500, e));
            }
        }