public static NanshopDbContext nanshopDbContext() { var connectionString = "Data Source=localhost; Initial Catalog=AlphaShop; Integrated Security=False; User ID=sa; Password=123Stella"; // Create options for DbContext instance var options = new DbContextOptionsBuilder <NanshopDbContext>() .UseSqlServer(connectionString) .Options; // Create instance of DbContext var dbContext = new NanshopDbContext(options); return(dbContext); }
public UserService(NanshopDbContext nanshopDbDbContext) { this.nanshopDbDbContext = nanshopDbDbContext; }
public ArticoliStore(NanshopDbContext nanshopDbContext) { this.nanshopDbContext = nanshopDbContext; }