public List <Vendor> GetAllVendors() { TaxiContext context = new TaxiContext(); return(context.Vendors.ToList()); return(null); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, TaxiContext dbContext, IServiceProvider serviceProvider) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } dbContext.Database.EnsureCreated(); app.UseAuthentication(); app.UseMvc(routes => routes.MapRoute(name: "default", template: "api/{controller}/{action=Post}/{id?}" ) ); CreateUserRoles(serviceProvider).Wait(); }
public static void Initialize(TaxiContext context) { var test = importTaxiTrips(); //context.Database.EnsureDeleted(); context.Database.EnsureCreated(); if (context.TaxiTrips.Any()) { return; } //add test data if the database is empty. var taxiTrips = importTaxiTrips(); /* var taxiTrips = new TaxiTrip[] */ foreach (TaxiTrip s in taxiTrips) { context.TaxiTrips.Add(s); } context.SaveChanges(); }
/// <summary> /// Constructor with parametres /// </summary> /// <param name="context">taxi info</param> public UserRepository(TaxiContext context) { _db = context; }
public Vendor GetByEmail(int id) { TaxiContext context = new TaxiContext(); return(context.Vendors.FirstOrDefault(x => x.Id == id)); }
public DriverController(TaxiContext context, ICoreLogger logger, ISMS <List <SendResult> > notify) { _context = context; _logger = logger; _notify = notify; }
public NotifyService(TaxiContext context) { _context = context; }
public AuthController(TaxiContext context) { _context = context; }
public DriverService(TaxiContext context) { _context = context; }
public AcademyCategoriesController(TaxiContext context) { _context = context; }
public HomeController(TaxiContext context) { _context = context; }
public ForumService(TaxiContext context) { _context = context; }
public CustomersRepository(TaxiContext context, IMapper mapper) : base(context, mapper) { }
public CarsController(TaxiContext context) { _context = context; }
/// <summary> /// Constructor with parametres /// </summary> /// <param name="connectionString"></param> public UnitOfWork(string connectionString) { _db = new TaxiContext(connectionString); }
public HomeController(TaxiContext context, ICoreLogger logger, IHostingEnvironment hostingEnvironment) { _context = context; _logger = logger; _hostingEnvironment = hostingEnvironment; }
public StudentParentsController(TaxiContext context) { _context = context; }
public TaxiServicesController(TaxiContext context) { _context = context; }
public AddressesRepository(TaxiContext context, IMapper mapper) : base(context, mapper) { }
public AdminService(TaxiContext context) { _context = context; }
public CitiesController(TaxiContext context) { _context = context; }
public TaxiSerivcesController(TaxiContext context, ICoreLogger logger, ISMS <List <SendResult> > sms) { _context = context; _logger = logger; _sms = sms; }
public ContractorsController(TaxiContext context) { _context = context; }
public CompaniesRepository(TaxiContext context, IMapper mapper) : base(context, mapper) { }
public TaxiTripsController(TaxiContext context) { _context = context; }
public GeneralSettingsController(TaxiContext context) { _context = context; }
public CustomerService(TaxiContext context) { _context = context; }
public TaxiReservationController(TaxiContext context) { _context = context; }
public DriversController(TaxiContext context) { _context = context; }
public MappingRepository(TaxiContext context, IMapper mapper) : base(context) { _mapper = mapper; }