public IDataResult <Video> GetById(int id) { var getToVideo = _videoDal.Get(v => v.Id == id); IResult result = BusinessRule.Run ( CheckIfVideoExist(id), _userService.CheckIfUserExist(getToVideo.UserId), _channelService.CheckIfChannelExist(getToVideo.ChannelId) ); if (result != null) { return(new ErrorDataResult <Video>(result.Message)); } return(new SuccessDataResult <Video>(getToVideo)); }
public Video GetById(int id) { return(_videoDal.Get(v => v.VideoID == id)); }