public string Delete(Blog blog) { try { _blogDal.Delete(blog); return(Messages.DeleteMessage); } catch (Exception ex) { return(string.Format("{0} {1}", Messages.DeleteMessageError, ex.Message)); } }
public bool Delete(Blog model) { try { return(blogDal.Delete(model)); } catch (Exception ex) { throw ex; } }
public IActionResult Delete(int?id) { if (id == null) { return(BadRequest()); } var blog = _blogDal.Get(x => x.Id == id); _blogDal.Delete(blog); return(Json("Blog Id :" + blog.Id)); }
public EntityResult Delete(Blog model) { try { if (_blogDal.Delete(model)) { return(new EntityResult("Silme başarılı", ResultState.Success)); } return(new EntityResult("Hata Oluştu", ResultState.Warning)); } catch (Exception ex) { return(new EntityResult("Database Hatası " + ex.ToInnestException().Message, ResultState.Error)); } }
public DataResponse Delete(Blog entity) { var blog = _blogDal.Delete(entity); if (blog == null) { return new DataResponse { Mesaj = "Aradiginiz Blog Bulunamadi", Tamamlandi = false } } ; return(new DataResponse { Data = blog, Mesaj = "Blog Silindi", Tamamlandi = true }); } }
public void Delete(int blogId) { _blogDal.Delete(new Blog { id = blogId }); }
public void Delete(Blog blog) { _blogDal.Delete(blog); }
public void Delete(Blog entity) { _blogDal.Delete(entity); }
public void Delete(int id) { var value = _blogDal.Get(x => x.Id == id); _blogDal.Delete(value); }
public void Delete(int id) { var blog = _blogDal.Get(p => p.Id == id); _blogDal.Delete(blog); }
public IResult Delete(Blog entity) { _blogDal.Delete(entity); return(new SuccessResult()); }