示例#1
0
        public List <Vendor> GetAllVendors()
        {
            TaxiContext context = new TaxiContext();

            return(context.Vendors.ToList());


            return(null);
        }
示例#2
0
 // 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();
 }
示例#3
0
        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();
        }
示例#4
0
 /// <summary>
 ///     Constructor with parametres
 /// </summary>
 /// <param name="context">taxi info</param>
 public UserRepository(TaxiContext context)
 {
     _db = context;
 }
示例#5
0
        public Vendor GetByEmail(int id)
        {
            TaxiContext context = new TaxiContext();

            return(context.Vendors.FirstOrDefault(x => x.Id == id));
        }
示例#6
0
 public DriverController(TaxiContext context, ICoreLogger logger, ISMS <List <SendResult> > notify)
 {
     _context = context;
     _logger  = logger;
     _notify  = notify;
 }
示例#7
0
 public NotifyService(TaxiContext context)
 {
     _context = context;
 }
示例#8
0
 public AuthController(TaxiContext context)
 {
     _context = context;
 }
示例#9
0
 public DriverService(TaxiContext context)
 {
     _context = context;
 }
示例#10
0
 public AcademyCategoriesController(TaxiContext context)
 {
     _context = context;
 }
示例#11
0
 public HomeController(TaxiContext context)
 {
     _context = context;
 }
示例#12
0
 public ForumService(TaxiContext context)
 {
     _context = context;
 }
示例#13
0
 public CustomersRepository(TaxiContext context, IMapper mapper) : base(context, mapper)
 {
 }
示例#14
0
 public CarsController(TaxiContext context)
 {
     _context = context;
 }
示例#15
0
 /// <summary>
 ///     Constructor with parametres
 /// </summary>
 /// <param name="connectionString"></param>
 public UnitOfWork(string connectionString)
 {
     _db = new TaxiContext(connectionString);
 }
示例#16
0
 public HomeController(TaxiContext context, ICoreLogger logger, IHostingEnvironment hostingEnvironment)
 {
     _context = context;
     _logger = logger;
     _hostingEnvironment = hostingEnvironment;
 }
示例#17
0
 public StudentParentsController(TaxiContext context)
 {
     _context = context;
 }
示例#18
0
 public TaxiServicesController(TaxiContext context)
 {
     _context = context;
 }
示例#19
0
 public AddressesRepository(TaxiContext context, IMapper mapper) : base(context, mapper)
 {
 }
示例#20
0
 public AdminService(TaxiContext context)
 {
     _context = context;
 }
示例#21
0
 public CitiesController(TaxiContext context)
 {
     _context = context;
 }
示例#22
0
 public TaxiSerivcesController(TaxiContext context, ICoreLogger logger, ISMS <List <SendResult> > sms)
 {
     _context = context;
     _logger  = logger;
     _sms     = sms;
 }
示例#23
0
 public ContractorsController(TaxiContext context)
 {
     _context = context;
 }
示例#24
0
 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;
 }
示例#28
0
 public TaxiReservationController(TaxiContext context)
 {
     _context = context;
 }
示例#29
0
 public DriversController(TaxiContext context)
 {
     _context = context;
 }
示例#30
0
 public MappingRepository(TaxiContext context, IMapper mapper) : base(context)
 {
     _mapper = mapper;
 }