Exemple #1
0
 public Release GetReleaseDetails(string releaseNumber)
 {
     using (ISession session = ReleaseRepository.CreateSessionFactory().OpenSession())
     {
         using (session.BeginTransaction())
             return(session.Get <Release>((object)releaseNumber));
     }
 }
Exemple #2
0
 public IEnumerable <Release> GetReleases()
 {
     using (ISession session = ReleaseRepository.CreateSessionFactory().OpenSession())
     {
         using (session.BeginTransaction())
             return((IEnumerable <Release>)session.CreateCriteria <Release>().List <Release>());
     }
 }
Exemple #3
0
 public void SaveReleaseDetails(Release release)
 {
     using (ISession session = ReleaseRepository.CreateSessionFactory().OpenSession())
     {
         using (ITransaction transaction = session.BeginTransaction())
         {
             session.SaveOrUpdate((object)release);
             transaction.Commit();
         }
     }
 }