Example #1
0
        public async Task <IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                return(Page());
            }

            await dataSource.CreateAsync(EditedNotebook);

            return(RedirectToPage("./Index"));
        }
Example #2
0
 public Task CreateAsync(Notebook notebook)
 {
     return(dataSource.CreateAsync(notebook));
 }