Пример #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            TimeKeeprDbContextFactory contextFactory = new TimeKeeprDbContextFactory();

            using (var db = contextFactory.CreateDbContext())
            {
                db.Database.MigrateAsync();
            }

            //making sure the decimal character is either , or . depending on locale
            FrameworkElement.LanguageProperty.OverrideMetadata(
                typeof(FrameworkElement),
                new FrameworkPropertyMetadata(
                    XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
            //System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("da-DK");
            Window window = new LoginView();

            window.ResizeMode = ResizeMode.NoResize;
            window.ShowDialog();
            InitializeComponent();
            base.OnStartup(e);
        }
Пример #2
0
 public DataService(TimeKeeprDbContextFactory contextFactory)
 {
     _contextFactory = contextFactory;
 }