1,673 questions
You can do something like this,
@if (plants == null)
{
<p>Loading...</p>
}
else
{
<table>
// your code
</table>
}
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>
}