public bool Update(Blog model) { try { return(blogDal.Update(model)); } catch (Exception ex) { throw ex; } }
public EntityResult Update(Blog model) { try { if (_blogDal.Update(model)) { return(new EntityResult("Başarılı", ResultState.Success)); } else { return(new EntityResult("Hata Oluştu", ResultState.Warning)); } } catch (Exception ex) { return(new EntityResult("Database Hatası " + ex.ToInnestException().Message, ResultState.Error)); } }
public async Task <IActionResult> Update(Blog blog, IFormFile file) { if (ModelState.IsValid) { blog.Date = DateTime.Now; if (file != null) { await UploadImage(blog, file); } _blogDal.Update(blog); TempData["message"] = $"{blog.Title} updated"; return(RedirectToAction("List")); } ViewBag.Categories = new SelectList(_categoryDal.GetList(), "Id", "Name"); return(View(blog)); }
public DataResponse Update(Blog entity) { var blog = _blogDal.Update(entity); if (blog == null) { return new DataResponse { Mesaj = "Blog Duzenlenemedi", Tamamlandi = false, } } ; return(new DataResponse { Data = blog, Tamamlandi = true, Mesaj = blog.Baslik + " Baslikli Blog Duzenlendi", }); }
public void Update(Blog blog) { _blogDal.Update(blog); }
public void Update(Blog entity) { _blogDal.Update(entity); }
public Blog Update(Blog blog) { return(_blogDal.Update(blog)); }
public IResult Update(Blog entity) { _blogDal.Update(entity); return(new SuccessResult()); }