예제 #1
0
        public RecipesService()
        {
            var options = new DbContextOptionsBuilder <RecipesDbContext>()
                          .UseInMemoryDatabase("TopsyTurvyCakes")
                          .Options;

            _context = new RecipesDbContext(options); // linking our database _context into this service, method below
        }
예제 #2
0
        public RecipesService()
        {
            var options = new DbContextOptionsBuilder <RecipesDbContext>()
                          .UseInMemoryDatabase("TopsyTurvyCakes")
                          .Options;

            _context = new RecipesDbContext(options);
        }
예제 #3
0
 public RecipesService(RecipesDbContext context)// that link
 {
     _context = context;
 }
예제 #4
0
 public RecipesService(RecipesDbContext context)
 {
     _context = context;
 }