public BaseUnitOfWork()
 {
     if (context == null)
     {
         context = new RadioInstallerContext();
     }
 }
 public virtual void Dispose(bool Disposing)
 {
     if (Disposing)
     {
         if (context != null)
         {
             context.Dispose();
             context = null;
         }
     }
 }
 public BaseReposotory(RadioInstallerContext context)
 {
     if (this.context == null)
     {
         this.context = context;
     }
     Database.SetInitializer <RadioInstallerContext>(null);
     context.Configuration.AutoDetectChangesEnabled = false;
     context.Configuration.ValidateOnSaveEnabled    = false;
     db = context.Set <T>();
 }