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); } }
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(); } }
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); } }
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); } }