Help my please. Why RadzenDropDown don`t work in my app?
(I'm sorry for my English)
<RadzenDropDown AllowClear="true" AllowFiltering="true"
@bind-Value=@Book.Genres Multiple="true" Placeholder="Select..." Data=@genres TextProperty="Name" ValueProperty="Id"
Style="width:300px" />
@code {
IEnumerable<Genre> genres = new List<Genre>();
[Parameter] public Book Book { get; set; } = new Book();
protected async override Task OnInitializedAsync()
{
bookAuthor = Book.Autor;
genres = await GenreService.GetAllGenres();
}
}
public class Genre
{
public int Id { get; set; }
[Required]
public string Name { get; set; }
public List<Book> Books { get; set; } = new List<Book>();
}
public class Book
{
public int Id { get; set; }
[Required]
[Range(1, int.MaxValue)]
public int NumberOfPages { get; set; }
[Required]
[Range(1, int.MaxValue)]
public double Price { get; set; }
[Required]
public string Name { get; set; }
[Required]
public DateTime DateOfCreate { get; set; }
[Required]
public string Description { get; set; }
[Required]
public string Picture { get; set; }
public Author Autor { get; set; }
public int AutorId { get; set; }
public List<Genre> Genres { get; set; }
}