示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthController"/> class.
 /// </summary>
 /// <param name="authService">
 /// The service.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 /// <param name="context">
 /// The context.
 /// </param>
 public AuthController(
     IAuthenticateService authService,
     ILogger <AuthController> logger,
     TmContext context)
 {
     this.authService = authService;
     this.logger      = logger;
     this.context     = context;
 }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FileController"/> class.
        /// </summary>
        /// <param name="logger">
        /// The logger.
        /// </param>
        /// <param name="repositoryWrapper">
        /// The repository wrapper.
        /// </param>
        /// <param name="context">
        /// The context.
        /// </param>
        public FileController(ILogger <FileController> logger, IRepositoryWrapper repositoryWrapper, TmContext context)
        {
            this.logger  = logger;
            this.context = context;

            if (this.document == null)
            {
                this.document = new Document(context);
            }
        }
示例#3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, TmContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseSignalR(route =>
            {
                route.MapHub <TripUpdateHub>("/tripshub");
            });

            app.UseMvc();
            Initialize(context);
        }
 public RepositoryWrapper(TmContext tmContext, ICallRepository call)
 {
     context   = tmContext;
     this.call = call;
 }
示例#5
0
 public ManyToManyRepository(TmContext tmContext) : base(tmContext)
 {
 }
示例#6
0
 public CallRepository(TmContext tmContext)
     : base(tmContext)
 {
 }
示例#7
0
 protected RepositoryBase(TmContext tmContext)
 {
     this.dbContext = tmContext;
     this.dbSet     = tmContext.Set <TEntity>();
 }
示例#8
0
 public QueryableRepository(TmContext tmContext) : base(tmContext)
 {
 }
示例#9
0
 public DbRepository(TmContext tmContext) : base(tmContext)
 {
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Document"/> class.
 /// </summary>
 /// <param name="context">
 /// The context.
 /// </param>
 public Document(TmContext context)
 {
     this.context = context;
 }
示例#11
0
 protected RepositoryBase(TmContext tmContext)
 {
     TmContext = tmContext;
 }
示例#12
0
 public UnitOfWork(TmContext context)
 {
     _context = context;
 }
示例#13
0
 public DbService(TmContext context, IHttpClientFactory clientFactory)
 {
     _ctx           = context;
     _clientFactory = clientFactory;
 }
示例#14
0
 public static void Initialize(TmContext context)
 {
     context.Database.Migrate();
 }