protected async Task HandleSubmit() { if (Category.Id == 0) { await CategoryApiService.Post(Category); } else { await CategoryApiService.Put(Category.Id, Category); } NavigationManager.NavigateTo("admin/categories"); }