Пример #1
0
            public override void Initialize()
            {
                base.Initialize();

                // Initialize the database set.
                using (CheckbookContext context = new CheckbookContext(this.dbContextOptions))
                {
                    DatabaseSeed.AddEntities(context);
                    this.entities = ContextDataService.GetBudgets(context);
                }
            }
Пример #2
0
            public override void Initialize()
            {
                base.Initialize();

                // Initialize the inputs.
                this.userId = 1;

                // Initialize the database set.
                using (CheckbookContext context = new CheckbookContext(this.dbContextOptions))
                {
                    DatabaseSeed.AddEntities(context);
                    this.entities = ContextDataService.GetBudgets(context)
                                    .Where(a => a.UserId == this.userId)
                                    .ToList();
                }
            }
Пример #3
0
            public override void Initialize()
            {
                base.Initialize();

                // Initialize the inputs.
                this.userId = 1;
                this.budget = new Budget
                {
                    Name       = "Third Budget",
                    UserId     = this.userId,
                    CategoryId = 1,
                };

                // Initialize the database set.
                using (CheckbookContext context = new CheckbookContext(this.dbContextOptions))
                {
                    DatabaseSeed.AddEntities(context);
                    this.entities = ContextDataService.GetBudgets(context);
                }
            }