Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,596 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm using server Blazor with Dapper, using Alan Simpsons YouTube Tutorial.
The PlantList.razor Page triggers the generation of a plant list in the PlantService.cs file. The query executes the stored procedure but never gets to the "return plants;" statement. Instead execution goes back to the PlantList.razor Page at the "foreach (statement 18) and fails because "plants" in null. I've also tried using a query - not a stored procedure - same result. Any suggestions? Thanks.
You can do something like this,
@if (plants == null)
{
<p>Loading...</p>
}
else
{
<table>
// your code
</table>
}