示例#1
0
        public TimeVideo Create(CreateTimeVideoCommand command)
        {
            var time = new TimeVideo(command.Time);

            time.Create();
            _repository.Create(time);

            if (Commit())
            {
                return(time);
            }

            return(null);
        }
 public static bool CreateTimeVideoScopeIsValid(this TimeVideo timeVideo)
 {
     return(AssertionConcern.IsSatisfiedBy(
                AssertionConcern.AssertTrue(!(timeVideo.Time == 0), "O tempo é obrigatório")
                ));
 }
示例#3
0
 public void Update(TimeVideo timeVideo)
 {
     _context.Entry <TimeVideo>(timeVideo).State = EntityState.Modified;
 }
示例#4
0
 public void Delete(TimeVideo timeVideo)
 {
     throw new System.NotImplementedException();
 }
示例#5
0
 public void Create(TimeVideo timeVideo)
 {
     _context.TimeVideo.Add(timeVideo);
 }