public IDataResult <Subscriber> GetById(int id) { IResult result = BusinessRule.Run ( CheckIfSubscriberExist(id) ); if (result != null) { return(new ErrorDataResult <Subscriber>(result.Message)); } return(new SuccessDataResult <Subscriber>(_subscriberDal.Get(s => s.Id == id))); }
public bool GetIsUserSubs(int channelId, int userId) { var result = _subscriberDal.Get(subs => subs.UserId == userId && subs.ChannelId == channelId); return(result != null); }