public static ISalesService GetSalesService() { var options = new DbContextOptionsBuilder <StoreDbContext>() .UseSqlServer(ConnectionString) .Options; return(new SalesService(LoggerMocker.GetLogger <ISalesService>(), new UserInfo { Name = "mocker" }, new StoreDbContext(options))); }
public static ISalesBusinessObject GetSalesBusinessObject() { var logger = LoggerMocker.GetLogger <ISalesBusinessObject>(); var userInfo = new UserInfo { Name = "mocker" }; var appSettings = Options.Create(AppSettingsMocker.Default); return(new SalesBusinessObject(logger, userInfo, new StoreDbContext(appSettings, new StoreEntityMapper()))); }
public static ISalesService GetSalesService() { var logger = LoggerMocker.GetLogger <ISalesService>(); var options = new DbContextOptionsBuilder <StoreDbContext>() .UseSqlServer("server=(local);database=Store;integrated security=yes;MultipleActiveResultSets=True;") .Options; return(new SalesService(logger, new UserInfo { Name = "mocker" }, new StoreDbContext(options, new StoreEntityMapper()))); }
public static IProductionService GetProductionService() { var logger = LoggerMocker.GetLogger <IProductionService>(); var options = new DbContextOptionsBuilder <StoreDbContext>() .UseSqlServer(ConnectionString) .Options; return(new ProductionService(logger, new UserInfo { Name = "mocker" }, new StoreDbContext(options, new StoreEntityMapper()))); }