Пример #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.category = new Category
                {
                    Name   = "Third Category",
                    UserId = this.userId,
                };

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

                // Initialize the input.
                this.userId = 1;
                this.budget = new Budget
                {
                    Id         = 2,
                    Name       = "Second Budget x",
                    UserId     = this.userId,
                    CategoryId = 1,
                };

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