I'have a table with a foreign key that is correctly displayed using the ToString override.
But i cannot filter on that column.
here is ma code :
` public class Carrello
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string? Note { get; set; }
[Display(AutoGenerateField = false)]
public int StatoCarrelloId { get; set; }
[ForeignKey("StatoCarrelloId")]
public StatoCarrello StatoCarrello { get; set; }
}
public class StatoCarrello
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; set; }
public string Name { get; set; } = string.Empty;
public override string ToString()
{
return Name ?? String.Empty;
}
}
`
If I try filtering on StatoCarrello nothing append.
As you can see it is visible on the toolbar link
I'have a table with a foreign key that is correctly displayed using the ToString override. But i cannot filter on that column. here is ma code : ` public class Carrello { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; }
}
public class StatoCarrello { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int Id { get; set; }
} `
If I try filtering on StatoCarrello nothing append. As you can see it is visible on the toolbar link
Thanks Regards