コード例 #1
0
        public UserServiceTests()
        {
            AutoMapperInitializer.Initialize();

            this.databaseMock = BookHeavenDbContextInMemory.New();
            this.sut          = new UserService(this.databaseMock, null, null);
        }
コード例 #2
0
        public BookServiceTests()
        {
            AutoMapperInitializer.Initialize();

            this.databaseMock   = BookHeavenDbContextInMemory.New();
            this.fileServicMock = new Mock <IFileService>();
            this.sut            = new BookService(this.databaseMock, this.fileServicMock.Object);
        }
コード例 #3
0
        public static IApplicationBuilder UseDatabaseMigration(this IApplicationBuilder app)
        {
            using (IServiceScope scope = app.ApplicationServices.CreateScope())
            {
                BookHeavenDbContext db = scope.ServiceProvider.GetService <BookHeavenDbContext>();
                db.Database.Migrate();
            }

            return(app);
        }
コード例 #4
0
 public UserService(BookHeavenDbContext db, UserManager <User> userManager, IFileService fileService)
 {
     this.db          = db;
     this.userManager = userManager;
     this.fileService = fileService;
 }
コード例 #5
0
 public VoteService(BookHeavenDbContext db)
 {
     this.db = db;
 }
コード例 #6
0
 public LocationService(IHttpClientService httpClient, IJsonService json, BookHeavenDbContext db)
 {
     this.httpClient = httpClient;
     this.json       = json;
     this.db         = db;
 }
コード例 #7
0
 public OrderService(BookHeavenDbContext db)
 {
     this.db = db;
 }
コード例 #8
0
 public CategoryService(BookHeavenDbContext db)
 {
     this.db = db;
 }
コード例 #9
0
 public SiteVisitService(BookHeavenDbContext db)
 {
     this.db = db;
 }
コード例 #10
0
 public BookService(BookHeavenDbContext db, IFileService files)
 {
     this.db    = db;
     this.files = files;
 }