public void Handle(AcceptViewingCommand command) { var viewing = _context.Viewings.Find(command.ViewingId); viewing.ViewingStatus = ViewingStatus.Confirmed; _context.SaveChanges(); }
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(); } }