Beispiel #1
0
        public async Task <ActionResult <ContatoViewModel> > Post(ContatoViewModel ContatoViewModel)
        {
            _logger.LogInformation("Executing api/Contato -> Post");

            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            return(Ok(_ContatoService.AddContato(_mapper.Map <ContatoViewModel, Contato>(ContatoViewModel))));
        }