示例#1
0
 public OdeToFoodSeeder(OdeToFoodDbContext ctx,
                        IHostingEnvironment hosting,
                        UserManager <AppUser> userManager)
 {
     _ctx         = ctx;
     _hosting     = hosting;
     _userManager = userManager;
 }
示例#2
0
        public static void Initialize(OdeToFoodDbContext context)
        {
            // Look for any movies.
            if (context.Restaurants.Any())
            {
                return;   // DB has been seeded
            }

            context.Restaurants.AddRange(
                new Restaurant {
                Name = "Scott's Pizza Place", Cuisine = CuisineType.French
            },
                new Restaurant {
                Name = "Tersiguels", Cuisine = CuisineType.Italian
            },
                new Restaurant {
                Name = "King's Contrivance", Cuisine = CuisineType.German
            }
                );

            context.SaveChanges();
        }
 public SqlRestaurantData(OdeToFoodDbContext odeToFoodDb)
 {
     _db = odeToFoodDb;
 }
示例#4
0
 public SqlRestaurantData(OdeToFoodDbContext context)
 {
     Context = context;
 }
示例#5
0
 public DetailsModel(OdeToFood.Data.OdeToFoodDbContext context)
 {
     _context = context;
 }
示例#6
0
 public EditModel(OdeToFood.Data.OdeToFoodDbContext context)
 {
     _context = context;
 }
示例#7
0
 public PostgreSQLRestaurantData(OdeToFoodDbContext db)
 {
     _db = db;
 }
 public SqlRestaurantData(OdeToFoodDbContext odeToFoodDbContext)
 {
     this.odeToFoodDbContext = odeToFoodDbContext;
 }
 public SqlRestarantsData(OdeToFoodDbContext db)
 {
     _context = db;
 }
示例#10
0
 public OdeToFoodRepository(OdeToFoodDbContext ctx, ILogger <OdeToFoodRepository> logger)
 {
     _ctx    = ctx;
     _logger = logger;
 }
示例#11
0
 public SqlRestaurantRepository(OdeToFoodDbContext dbContext)
 {
     _dbContext = dbContext;
 }
 public SqlRestaurantData(OdeToFoodDbContext db, ILogger <SqlRestaurantData> logger)
 {
     this.db     = db;
     this.logger = logger;
 }
示例#13
0
 public SqlServerData(OdeToFoodDbContext db)
 {
     this.db = db;
 }
示例#14
0
 public SqlRestaurantData(OdeToFoodDbContext _db)
 {
     db = _db;
 }
 public SqlVarorData(OdeToFoodDbContext db)
 {
     this.db = db;
 }
示例#16
0
 public IndexModel(OdeToFood.Data.OdeToFoodDbContext context)
 {
     _context = context;
 }
示例#17
0
 public RestaurantData(OdeToFoodDbContext db)
 {
     _db = db;
 }
示例#18
0
 public CreateModel(OdeToFood.Data.OdeToFoodDbContext context, IHtmlHelper htmlHelper)
 {
     _context        = context;
     this.htmlHelper = htmlHelper;
 }
示例#19
0
 public SqlRestaurantData(OdeToFoodDbContext dbContext)
 {
     this.dbContext = dbContext;
 }
 public DeleteModel(OdeToFood.Data.OdeToFoodDbContext context)
 {
     _context = context;
 }
示例#21
0
 public SqlRestaurantData(OdeToFoodDbContext db)
 {
     this.db = db;
 }
示例#22
0
 public SqlRestauraunt(OdeToFoodDbContext db)
 {
     this.db = db;
 }