Esempio n. 1
0
        public IResult Add(Video video)
        {
            IResult result = BusinessRule.Run
                             (
                CheckIfVideoAlreadyExist(video.Id),
                _userService.CheckIfUserExist(video.UserId),
                _channelService.CheckIfChannelExist(video.ChannelId)
                             );

            if (result != null)
            {
                return(result);
            }

            video.Date = DateTime.Now;

            _videoDal.Add(video);

            return(new SuccessResult());
        }
Esempio n. 2
0
 public void Add(Video video)
 {
     _videoDal.Add(video);
 }