public void Handle(AcceptViewingCommand command)
        {
            var viewing = _context.Viewings.Find(command.ViewingId);

            viewing.ViewingStatus = ViewingStatus.Confirmed;

            _context.SaveChanges();
        }
示例#2
0
        public void Handle(AcceptViewingCommand command)
        {
            var viewing = _context.Viewings.Find(command.ViewingId);

            viewing.UpdatedAt = DateTime.Now;
            viewing.Status    = ViewingStatus.Accepted;

            _context.SaveChanges();
        }
        public void Handle(AcceptViewingCommand command)
        {
            var viewing = _context.Viewings.Find(command.ViewingId);

            if (viewing != null)
            {
                viewing.ViewingStatus = ViewingStatus.Accepted;
                _context.SaveChanges();
            }
        }