Esempio n. 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.GetCategories(context);
                }
            }
Esempio n. 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.GetCategories(context)
                                    .Where(a => a.UserId == this.userId)
                                    .ToList();
                }
            }
Esempio n. 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);
                }
            }