Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
@page "/movies/create"
@inject NavigationManager navigationManager
<h3>Create Movie</h3>
<MovieForm Movie="Movie" OnValidSubmit="SaveMovie" NotSelectedGenres="NotSelectedGenres" />
@code {
private Movie Movie = new Movie();
private List<Genre> NotSelectedGenres = new List<Genre>()
new Genre(){Id = 1, Name = "Action"},
new Genre(){Id = 2, Name = "Comedy"},
new Genre(){Id = 3, Name = "Drama"}
private void SaveMovie()
Console.WriteLine("this works");
// Saving movie...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment