public static ProjectDataContext GetDataContext(ProjectDataContext context, DbContextTransaction transaction)
 {
     if (transaction != null && context != null)
     {
         return(new ProjectDataContext(context.Database.Connection, transaction));
     }
     return(new ProjectDataContext());
 }
 public virtual bool CheckConnection(ProjectDataContext context)
 {
     try
     {
         context.Database.Connection.Open();
         context.Database.Connection.Close();
     }
     catch (Exception e)
     {
         return(false);
     }
     return(true);
 }
Beispiel #3
0
 public UnitOfWork(ProjectDataContext projectDataContext)
 {
     this._projectDataContext = projectDataContext;
 }