efcore.pg
efcore.pg copied to clipboard
Support of jsonb along with other type
I have reported the issue here and it seems the solution is available in version 7. Would like does the fix work for creating a TsVector with a combination of String & JSONB types like below? Thanks for your help!
public class User : BaseEntity
{
public string Title { get; set; }
public string Description { get; set; }
public List<string> Tags { get; set; }
public NpgsqlTsVector SearchVector { get; set; }
}
modelBuilder.Entity<UserBusinessInfo>()
.HasGeneratedTsVectorColumn(
b => b.SearchVector,
"english", // Text search config
b => new { b.Title, T.Description, b.Tags }) // Included properties
.HasIndex(b => b.SearchVector)
.HasMethod("GIN");