public UserProfileRepositoryTest() { var options = new DbContextOptionsBuilder <PlaygroundDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; _dbContext = new PlaygroundDbContext(options); _dbContext.Users.Add(new ApplicationUser { Id = 1, Email = "*****@*****.**" }); _dbContext.UserProfiles.Add(new UserProfile { Id = 1, FirstName = "John", LastName = "Doe", AppUserId = 1 }); _dbContext.SaveChanges(); _cache = new Mock <IDistributedCache>(); _logger = new Mock <ILogger <UserProfileRepository> >(); }
public FacilityRepositoryTest() { var options = new DbContextOptionsBuilder <PlaygroundDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; _dbContext = new PlaygroundDbContext(options); _dbContext.Sites.Add(new Site { Id = 1, Name = "Site 1" }); _dbContext.Facilities.Add(new Facility { Id = 1, Name = "Facility 1", SiteId = 1 }); _dbContext.SaveChanges(); _cache = new Mock <IDistributedCache>(); _logger = new Mock <ILogger <FacilityRepository> >(); }
public DispatchSubscriptionOrdersTask(PlaygroundDbContext db) { _db = db; }
public RestaurantRepository(PlaygroundDbContext playgroundDbContext) : base(playgroundDbContext) { }
public SiteRepository(PlaygroundDbContext dbContext, IDistributedCache cache, ILogger <SiteRepository> logger) : base(dbContext, cache, logger) { }
public UserStore(PlaygroundDbContext context) : base(context) { }
public CuisineRepository(PlaygroundDbContext playgroundDbContext) : base(playgroundDbContext) { }
protected BaseRepository(PlaygroundDbContext dbContext, IDistributedCache cache, ILogger logger) { Db = dbContext; Cache = cache; Logger = logger; }
public RepositoryBase(PlaygroundDbContext dbContext) { _dbContext = dbContext; }