public static ProjectDataContext GetDataContext(ProjectDataContext context, DbContextTransaction transaction)
 {
     if (transaction != null && context != null)
     {
         return(new ProjectDataContext(context.Database.Connection, transaction));
     }
     return(new ProjectDataContext());
 }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 public UnitOfWork(ProjectDataContext projectDataContext)
 {
     this._projectDataContext = projectDataContext;
 }