public IActionResult Get(string id)
 {
     try
     {
         long identificador = 0;
         if (!long.TryParse(id, out identificador))
         {
             return(BadRequest(new DTO.ResponseError()
             {
                 ErrorCode = 400, ErrorMessage = "Bad request", Success = false
             }));
         }
         Aplicacion.Services.ArticlesService servicio = new Aplicacion.Services.ArticlesService();
         Aplicacion.Adaptadores.Article      article  = servicio.GetArticleNoTracking(identificador);
         if (article == null)
         {
             return(NotFound(new DTO.ResponseError()
             {
                 ErrorCode = 404, ErrorMessage = "Record not Found", Success = false
             }));
         }
         return(Ok(new DTO.ResponseArticle()
         {
             Success = true, Article = article
         }));
     }
     catch (Exception ex)
     {
         logger.LogError("Ocurrió un error interno. Id: " + id.ToString(), ex);
         return(StatusCode(500, new DTO.ResponseError()
         {
             ErrorCode = 500, ErrorMessage = "Server Error", Success = false
         }));
     }
 }
 public void Put(long id, [FromBody] Aplicacion.Adaptadores.Article value)
 {
     Aplicacion.Services.ArticlesService servicio = new Aplicacion.Services.ArticlesService();
     Aplicacion.Adaptadores.Article      article  = servicio.GetArticleNoTracking(id);
     if (article != null)
     {
         value.Id = id;
         servicio.UpdateArticle(value);
         servicio.SaveChanges();
     }
 }