I've unsuccessfully tried using data annotation in my entity class, e.g.:
Code: Select all
    <Required>
    <Index(IsUnique:=False)>
    <StringLength(FormulaFieldLength)>
    Public Property Formula As String
Code: Select all
        Dim ndx = "IX_" & NameOf(Peptides) & "_" & NameOf(Peptide.Formula)
        With Me.Property(Function(p) p.Formula)
            .HasMaxLength(FormulaFieldLength)
            .IsRequired()
            .HasColumnAnnotation(IndexAnnotation.AnnotationName,
                                 New IndexAnnotation(New IndexAttribute(ndx) With {.IsUnique = False}))
        End With
What an I doing wrong? I presume dotConnect for SQLite suppports Entity Framework's Code First methods for creating indexes, or is that not the case?