public HintCollection SaveOrUpdateMerge(HintCollection hintCollection)
        {
            object mergedObj = Session.Merge(hintCollection);

            HibernateTemplate.SaveOrUpdate(mergedObj);
            return((HintCollection)mergedObj);
        }
 public HintCollection Save(HintCollection hintCollection)
 {
     if (hintCollection.Id == Guid.Empty)
     {
         hintCollection.Id = Guid.NewGuid();
     }
     HibernateTemplate.Save(hintCollection);
     return(hintCollection);
 }
Exemplo n.º 3
0
        private bool ExistsInHintCollection(UXComponent comp)
        {
            HintCollection hintCollection = ModelService.GetDomainObject <HintCollection>(comp.Hint.HintCollection.Id);

            foreach (Hint hint in hintCollection.Hints)
            {
                if (hint.Id == comp.HintId)
                {
                    return(true);
                }
            }

            return(false);
        }
 public void Delete(HintCollection hintCollection)
 {
     HibernateTemplate.Delete(hintCollection);
 }
 public HintCollection SaveOrUpdate(HintCollection hintCollection)
 {
     HibernateTemplate.SaveOrUpdate(hintCollection);
     return(hintCollection);
 }