Пример #1
0
        public void Execute(EstadoPerfilInsertDto dto)
        {
            var registro = _mapper.Map <EstadoPerfilInsertDto, EstadoPerfil>(dto);

            _context.EstadoPerfiles.Add(registro);
            _context.Save();
        }
        public ActionResult CreateEstadoPerfil(EstadoPerfilInsertDto dto)
        {
            string token    = Microsoft.AspNetCore.Authentication.AuthenticationHttpContextExtensions.GetTokenAsync(HttpContext, "access_token").Result;
            var    response = HttpRequestFactory.Post(_configuration["Endpoints:EstadoPerfiles"], dto, token).Result;

            _logger.LogInformation(string.Format("CreateEstadoPerfil: StatusCode:{0} , RequestMessage:{1} ", response.StatusCode, response.RequestMessage));
            return(convertMessage(response, response.ContentAsType <EstadoPerfilInsertDto>()));
        }
Пример #3
0
 public ActionResult Post(EstadoPerfilInsertDto dto)
 {
     _insertEstadoPerfil.Execute(dto);
     _logger.LogInformation(string.Format("EstadoPerfil Id:{0} Creada por Usuario: {1} ", dto.Id, dto.Identity));
     return(Ok());
 }