Ejemplo n.º 1
0
 public IActionResult Put(int id, [FromBody] LogoViewModel logo)
 {
     if (_logoAppService.GetById(logo.Id).Id != 0)
     {
         logo = _logoAppService.Update(logo);
         logo.AddRangeLink(_logoEnricher.CreateLinks(Method.Put, logo));
         return(Ok(logo));
     }
     else
     {
         return(BadRequest());
     }
 }
Ejemplo n.º 2
0
 public LogoViewModel Post([FromBody] LogoViewModel logo)
 {
     logo = _logoAppService.Add(logo);
     logo.AddRangeLink(_logoEnricher.CreateLinks(Method.Post, logo));
     return(logo);
 }