public IDataResult <Comment> GetById(int commentId) { try { return(new SuccessDataResult <Comment>(_commentDal.Get(c => c.Id == commentId), Messages.SuccessGetById)); } catch (Exception) { return(new ErrorDataResult <Comment>(Messages.ErrorGetById)); } }
public IDataResult <Comment> GetById(int id) { IResult result = BusinessRule.Run ( CheckIfCommentExist(id) ); if (result != null) { return(new ErrorDataResult <Comment>(result.Message)); } return(new SuccessDataResult <Comment>(_commentDal.Get(c => c.Id == id))); }
public bool DeleteComment(int id) { try { var comment = _commentDal.Get(x => x.Id == id); _commentDal.Delete(comment); _commentDal.Save(); return(true); } catch (Exception exp) { return(false); } }
public IDataResult <Comment> Get(int id) { var comment = _commentDal.Get(x => x.Id == id); if (comment != null) { return(new SuccessDataResult <Comment>(comment)); } return(new ErrorDataResult <Comment>(Messages.Get)); }
public Comment Get(Expression <Func <Comment, bool> > filter, params string[] includeList) { try { return(commentDal.Get(filter, includeList)); } catch (Exception ex) { throw ex; } }
public EntityResult <Comment> Get(Expression <Func <Comment, bool> > filter, params string[] includeList) { try { var comment = _commentDal.Get(filter, includeList); if (comment != null) { return(new EntityResult <Comment>(comment, "Başarılı", ResultState.Success)); } return(new EntityResult <Comment>(null, "Hata oluştu", ResultState.Warning)); } catch (Exception ex) { return(new EntityResult <Comment>(null, "Database Hatası " + ex.ToInnestException().Message, ResultState.Error)); } }
public DataResponse Get(int id) { var comment = _commentDal.Get(i => i.ID == id); if (comment == null) { return new DataResponse { Mesaj = "Aradiginiz Yorum Bulunamadi", Tamamlandi = false } } ; return(new DataResponse { Data = comment, Mesaj = "Yorum Getirildi", Tamamlandi = true }); }
public IDataResult <Comment> GetById(int Id) { return(new SuccessDataResult <Comment>(_commentDal.Get(c => c.Id == Id), Messages.CommentGetted)); }
public IDataResult <Comment> Get(int id) { return(new SuccessDataResult <Comment>(_commentDal.Get(c => c.Id == id))); }
public Comment GetById(int id) { return(_commentDal.Get(c => c.CommentId == id)); }
public Comments Get(Expression <Func <Comments, bool> > filter = null) { return(_commentDal.Get(filter)); }
public Comment Get(int id) { return(_commentDal.Get(p => p.Id == id)); }
public Comment GetByItem(object item) { return(_commentDal.Get(c => c.CommentId == (int)item)); }
public Comment Get(Expression <Func <Comment, bool> > filter) { return(_commentDal.Get(filter)); }
public Comment Get(int id) { return(_commentDal.Get(c => c.Id == id)); }
public IResult Delete(int id) { var value = _commentDal.Get(x => x.Id == id); _commentDal.Delete(value); return new SuccessResult(); }
public Comment Get(int id) { return(commentDal.Get(x => x.ID == id)); }
public Comment Get(int Id) { return(_CommentDal.Get(x => x.Id == Id)); }
public IDataResult <Comment> GetById(int commentID) { return(new SuccessDataResult <Comment>(_commentDal.Get(p => p.ID == commentID))); }
public Comment GetCommentsById(int commentId) { return(_commentDal.Get(x => x.CommentId == commentId)); }
public IDataResult <Comment> GetById(int commentId) { return(new SuccessDataResult <Comment>(_commentDal.Get(c => c.Id == commentId))); }
public void Delete(int id) { var value = _commentDal.Get(x => x.Id == id); _commentDal.Delete(value); }
public Comment GetById(int commendId) { return(_commentDal.Get(c => c.Id == commendId)); }
public IDataResult <Comment> GetComment(int commentId) { var model = _commentDal.Get(i => i.Id == commentId); return(new SuccessDataResult <Comment>(model, Messages.Success)); }