public KeyWordDto Get(int id) { KeyWords keyWord = _dB.Get(id); KeyWordDto keyWordDto = Mapper.KeyWords_To_KeyWordDto(keyWord); return(keyWordDto); }
public ActionResult Edit(KeyWordDto keyWords) { if (ModelState.IsValid) { _searchKeywordsDTO.Add(keyWords); return(RedirectToAction("Index")); } return(View(keyWords)); }
public static KeyWordDto KeyWords_To_KeyWordDto(KeyWords keyWord) { var keyWordDto = new KeyWordDto { Id = keyWord.Id, KeyWord = keyWord.KeyWord, IsCategory = keyWord.IsCategory ?? false }; return(keyWordDto); }
public static KeyWords KeyWordDto_To_KeyWords(KeyWordDto keyWordDto) { var keyWords = new KeyWords { Id = keyWordDto.Id, KeyWord = keyWordDto.KeyWord, IsCategory = keyWordDto.IsCategory }; return(keyWords); }
// GET: KeyWords/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } KeyWordDto keyWords = _searchKeywordsDTO.Get((int)id); if (keyWords == null) { return(HttpNotFound()); } return(View(keyWords)); }
public IActionResult GuardarKeyWords(KeyWordDto keyWordDto) { try { ApiCallResult result = this.blogService.GuardarKeyWord(keyWordDto.Nombre); return(StatusCode((int)System.Net.HttpStatusCode.OK, result)); } catch (NegocioExecption e) { return(StatusCode((int)System.Net.HttpStatusCode.NotFound, e.Message)); } catch (Exception e) { return(StatusCode((int)System.Net.HttpStatusCode.InternalServerError, e.Message)); } }
public void Update(KeyWordDto keyWords) { KeyWords keyWord = Mapper.KeyWordDto_To_KeyWords(keyWords); _dB.Update(keyWord); }
public void Add(KeyWordDto keyWords) { KeyWords keyWord = Mapper.KeyWordDto_To_KeyWords(keyWords); _dB.Create(keyWord); }