Пример #1
0
 public static void CreateContext()
 {
     if (context == null)
     {
         lock (_lockSync)
         {
             if (context == null)
             {
                 context = new databaseContext();
             }
         }
     }
 }
Пример #2
0
 public repository()
 {
     db         = repositoryBase.context;
     _objectSet = db.Set <T>();
 }