Shyamal Parikh Shyamal Parikh - 4 months ago 44
C# Question

EF6: Full-text Search with Database First Approach

I found this link to make

full-text search
work through
. However, the code seems to be targeting
database first approach
. How to make it work with
Database First Approach

Relevant part of code:

public class NoteMap : EntityTypeConfiguration<Note>
public NoteMap()
// Primary Key
HasKey(t => t.Id);
public class MyContext : DbContext
static MyContext()
DbInterception.Add(new FtsInterceptor());
public MyContext(string nameOrConnectionString) : base(nameOrConnectionString)
public DbSet<Note> Notes { get; set; }
protected override void OnModelCreating(DbModelBuilder modelBuilder)
modelBuilder.Configurations.Add(new NoteMap());

As seen above the function
is only called in
Code First Approach
. I wonder what needs to change to make the code in link work for
Database First


Ok, I tried implementing the solution without OnModelCreating altogether and it turns out that it is not even needed for FullText interceptor implementation as @Evk suggested.