예제 #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)
 {
 }
예제 #25
0
 public TaxiTripsController(TaxiContext context)
 {
     _context = context;
 }
예제 #26
0
 public GeneralSettingsController(TaxiContext context)
 {
     _context = context;
 }
예제 #27
0
 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;
 }