We will follow the "Code-first gRPC" approach, as explained here.
The GridBlazor component installation for gRPC is straightforward. Just follow these steps:
-
Create a new Blazor client-side solution using the Blazor WebAssembly App template
-
Install the following nuget packages on the client project:
-
Install the following nuget packages on the server project:
-
Install the following nuget packages on the shated project:
-
Add the following lines to the wwwroot/index.html file:
<link href="_content/GridBlazor/css/gridblazor.min.css" rel="stylesheet" /> <script src="_content/GridBlazor/js/gridblazor.js"></script>
These files will be loaded from the GridBlazor nuget package, so it is not necessary to copy it to you project.
-
If you are using Boostrap 3.x you will also need this line in the wwwroot/index.html file:
<link href="~/_content/GridBlazor/css/gridblazor-bootstrap3.min.css" rel="stylesheet" />