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); }
public static IApplicationBuilder UseDatabaseMigration(this IApplicationBuilder app) { using (IServiceScope scope = app.ApplicationServices.CreateScope()) { BookHeavenDbContext db = scope.ServiceProvider.GetService <BookHeavenDbContext>(); db.Database.Migrate(); } return(app); }
public UserService(BookHeavenDbContext db, UserManager <User> userManager, IFileService fileService) { this.db = db; this.userManager = userManager; this.fileService = fileService; }
public VoteService(BookHeavenDbContext db) { this.db = db; }
public LocationService(IHttpClientService httpClient, IJsonService json, BookHeavenDbContext db) { this.httpClient = httpClient; this.json = json; this.db = db; }
public OrderService(BookHeavenDbContext db) { this.db = db; }
public CategoryService(BookHeavenDbContext db) { this.db = db; }
public SiteVisitService(BookHeavenDbContext db) { this.db = db; }
public BookService(BookHeavenDbContext db, IFileService files) { this.db = db; this.files = files; }