public static ProjectDataContext GetDataContext(ProjectDataContext context, DbContextTransaction transaction)
 {
     if (transaction != null && context != null)
     {
         return(new ProjectDataContext(context.Database.Connection, transaction));
     }
     return(new ProjectDataContext());
 }
 static void Main()
 {
     Persistence.ProjectDataContext _projectDataContext = new Persistence.ProjectDataContext();
     Persistence.Repositories.LanguageLibraryRepository _languageLibraryRepository = new Persistence.Repositories.LanguageLibraryRepository(_projectDataContext);
     DevExpress.Skins.SkinManager.EnableFormSkins();
     DevExpress.UserSkins.BonusSkins.Register();
     DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle(Properties.Settings.Default.Theme);
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     GlobalConstants.printerName     = Properties.Settings.Default.PrinterName;
     GlobalConstants.languageLibrary = _languageLibraryRepository.GetAll().ToList();
     GlobalConstants.language        = Properties.Settings.Default.Language;
     License();
 }
 public UnitOfWork(ProjectDataContext projectDataContext)
 {
     this._projectDataContext = projectDataContext;
 }