public ShortenedUrlController( UrlShortenerDbContext dbContext, UrlShorteningService urlShorteningService) { _dbContext = dbContext; _urlShorteningService = urlShorteningService; }
public void SetUp() { var options = new DbContextOptionsBuilder <UrlShortenerDbContext>() .UseInMemoryDatabase("TestDatabase") .Options; dbContext = new UrlShortenerDbContext(options); }
public UserService( UrlShortenerDbContext db, UserManager <User> userManager, IOptions <JwtSettings> jwtSettings) { this.db = db; this.userManager = userManager; this.jwtSettings = jwtSettings.Value; }
public VisitorsController(UrlShortenerDbContext urlShortenerDbContext) { _urlShortenerDbContext = urlShortenerDbContext; }
/// <summary> /// Creates an instance of <see cref="UrlRepository"/> /// </summary> /// <param name="db">The DB context</param> public UrlRepository(UrlShortenerDbContext db) : base(db) { }
public SqlUrlModelData(UrlShortenerDbContext context) { _context = context; }
/// <summary> /// Creates an instance of <see cref="Repository{TEntity, TKey}"/> /// </summary> /// <param name="db">The DB context</param> public Repository(UrlShortenerDbContext db) { this.db = db ?? throw new ArgumentNullException(nameof(db)); }
public static async Task SeedDatabase(this UrlShortenerDbContext db, RoleManager <UserRole> roleManager) { await SeedRoles(roleManager); }
public RedirectController(UrlShortenerDbContext dbContext) { this.dbContext = dbContext; }
public UrlController(UrlShortenerDbContext urlShortenerDbContext) { _urlShortenerDbContext = urlShortenerDbContext; }
public UrlShortenerService(UrlShortenerDbContext dbContext) { this.dbContext = dbContext; }
public ShortenController(UrlShortenerDbContext dbContext) { this.dbContext = dbContext; }