public CouponRepository(CouponManagementContext couponManagementContext) { _couponManagementContext = couponManagementContext; var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly()); XmlConfigurator.Configure(logRepository, new FileInfo("log4net.config")); }
public void SetUp() { mockCouponManagementContext = new Sqlite().CreateSqliteConnection(); couponRepository = new CouponRepository(mockCouponManagementContext); mockCouponData = new CouponData(); mockUserDatas = new UserDatas(); }
public CouponManagementContext CreateSqliteConnection() { var connection = new SqliteConnection("DataSource=:memory:"); connection.Open(); var option = new DbContextOptionsBuilder <CouponManagementContext>().UseSqlite(connection).Options; var context = new CouponManagementContext(option); if (context != null) { context.Database.EnsureDeleted(); context.Database.EnsureCreated(); } return(context); }
public CouponRepository(CouponManagementContext couponManagementContext) { _couponManagementContext = couponManagementContext; }
public UserRepository(CouponManagementContext couponManagementContext) { this.couponManagementContext = couponManagementContext; }
public CustomAuthenticationManager(CouponManagementContext couponManagementContext) { _couponManagementContext = couponManagementContext; }