May 2018
Intermediate to advanced
334 pages
7h 25m
English
The context class can be found in the same folder that has the OnConfiguring and OnModelCreating methods with a property for Customers.
The following code block shows the FlixOneStoreContext class:
using Microsoft.EntityFrameworkCore;namespace DemoECommerceApp.Models{ public partial class FlixOneStoreContext : DbContext { public virtual DbSet<Customers> Customers { get; set; } public FlixOneStoreContext(DbContextOptions< FlixOneStoreContext> options) : base(options) { } // Code is commented below, because we are applying dependency injection inside startup. // protected override void OnConfiguring( DbContextOptionsBuilder optionsBuilder) // { // if (!optionsBuilder.IsConfigured) // { //#warning To protect potentially ...