Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter on foreign key doesn'y work #104

Open
fabiogravna opened this issue Feb 16, 2024 · 0 comments
Open

Filter on foreign key doesn'y work #104

fabiogravna opened this issue Feb 16, 2024 · 0 comments

Comments

@fabiogravna
Copy 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 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

image

Thanks
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant