public EditablePresentViewModel(IPresentRepository presentRepository, Present present, PresentList list)
        {
            _presentRepository = presentRepository;
            _present = present;
            _list = list;

            SaveCommand = new RelayCommand(SavePresent);
        }
 public void Save(Present present, PresentList list)
 {
     using (var session = _sessionManager.OpenSession())
     {
         try
         {
             list.AddPresent(present);
             session.SaveOrUpdate(present);
         }
         catch (HibernateException he)
         {
             Logger.Error(he.Message, he);
             throw new RepositoryException();
         }
     }
 }
 public virtual void AddPresent(Present present)
 {
     Presents.Add(present);
     present.List = this;
 }
 public PresentSummaryViewModel(Present present)
 {
     _present = present;
 }