public UserServiceTests()
        {
            AutoMapperInitializer.Initialize();

            this.databaseMock = BookHeavenDbContextInMemory.New();
            this.sut          = new UserService(this.databaseMock, null, null);
        }
        public BookServiceTests()
        {
            AutoMapperInitializer.Initialize();

            this.databaseMock   = BookHeavenDbContextInMemory.New();
            this.fileServicMock = new Mock <IFileService>();
            this.sut            = new BookService(this.databaseMock, this.fileServicMock.Object);
        }
Example #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);
        }
Example #4
0
 public UserService(BookHeavenDbContext db, UserManager <User> userManager, IFileService fileService)
 {
     this.db          = db;
     this.userManager = userManager;
     this.fileService = fileService;
 }
Example #5
0
 public VoteService(BookHeavenDbContext db)
 {
     this.db = db;
 }
 public LocationService(IHttpClientService httpClient, IJsonService json, BookHeavenDbContext db)
 {
     this.httpClient = httpClient;
     this.json       = json;
     this.db         = db;
 }
Example #7
0
 public OrderService(BookHeavenDbContext db)
 {
     this.db = db;
 }
 public CategoryService(BookHeavenDbContext db)
 {
     this.db = db;
 }
 public SiteVisitService(BookHeavenDbContext db)
 {
     this.db = db;
 }
Example #10
0
 public BookService(BookHeavenDbContext db, IFileService files)
 {
     this.db    = db;
     this.files = files;
 }