コード例 #1
0
        public async Task CreateCliente(ClienteForCreationModel model)
        {
            if (model == null)
            {
                throw new Exception("Erro");
            }

            var cliente = _mapper.Map <CLIENTE>(model);
            var res     = await _repository.CreateCLIENTE(cliente, model.Password);

            if (res.Succeeded)
            {
                return;
            }

            throw new Exception("Erro");
        }
コード例 #2
0
        public async Task <IActionResult> CreateCliente(ClienteForCreationModel model)
        {
            await _service.CreateCliente(model);

            return(Ok());
        }