Created
January 16, 2020 14:41
-
-
Save gavilanch/b419204b42e8fcbb9e8270f34f6edb22 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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... | |
//navigationManager.NavigateTo("movie"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment