예제 #1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app,
                              IHostingEnvironment env,
                              ILoggerFactory loggerFactory,
                              TripPlannerContext context)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseMvc();
        }
예제 #2
0
        static void Main(string[] args)
        {
            using (var db = new TripPlannerContext())
            {
                Console.WriteLine("it works");

                //db.Todos.Add(new Todo
                //{
                //    Id = Guid.NewGuid(),
                //    Description = "To solve the lab 4 - second shot",
                //    IsCompleted = false
                //});
                //var saveChanges = db.SaveChanges();
                //Console.WriteLine($"{saveChanges} recorded have been added");
            }
        }
예제 #3
0
 static void Main(string[] args)
 {
     var context = new TripPlannerContext();
 }
예제 #4
0
 public UserDataRepository(TripPlannerContext context, IUserService userService)
 {
     _context     = context;
     _userService = userService;
 }
예제 #5
0
 public BaseRepository(TripPlannerContext dbContext)
 {
     DbContext = dbContext;
 }
예제 #6
0
 public LocationsRepository(TripPlannerContext context)
 {
     _context = context;
 }
예제 #7
0
 public BaseRepository(TripPlannerContext dbContext)
 {
     DbContext = dbContext;
     dbSet     = DbContext.Set <T>();
 }
예제 #8
0
 public PlanRepository(TripPlannerContext context)
 {
     _context = context;
 }
예제 #9
0
 public RepositoryBase(TripPlannerContext context)
 {
     _context = context;
 }
 public RepositoryWrapper(TripPlannerContext context)
 {
     _context = context;
 }
예제 #11
0
 public DatabaseSeedData(IOptions <DatabaseUpdateOptions> options, TripPlannerContext context, ILogger <DatabaseSeedData> logger)
 {
     _options = options.Value;
     _context = context;
     _logger  = logger;
 }
 public UserRepository(TripPlannerContext context) : base(context)
 {
 }
예제 #13
0
 public CountriesController(TripPlannerContext context)
 {
     _context = context;
 }