public ArticlesContext(DatabaseContextOptions options) : base(options) { Articles = Collection <Article>("articles", (fb, article) => fb.Where(e => e.Id == article.Id)) .HasIndex( idx => idx.Combine( idx.Text(e => e.Title), idx.Text(e => e.Body) ), (build, index) => { index.Weights = build.Weights() .Assign(e => e.Title, 5); } ) .HasIndex(idx => idx.Ascending(e => e.CreatedAt)) .ToDbCollection(); }
public DatabaseContext( IOptions <DatabaseContextOptions> options) { _options = options.Value; }
protected override ArticlesContext CreateContext(DatabaseContextOptions options) { return(new ArticlesContext(options)); }
public MyContext(DatabaseContextOptions options) : base(options) { }
public ConstraintTranslator(DatabaseContextOptions options) { options_ = options; }