-
Book Overview & Buying
-
Table Of Contents
Web Development with Blazor - Second Edition
By :
To save our blog posts, we will use JSON files stored in a folder and to do so we need to create a new project.
There are many ways of persisting data, document databases, relational databases, and files to name a few. To remove complexity from the book we will use the simplest way of creating blog posts simply by storing them as JSON in a folder.
The data will be accessible from both our Blazor WebAssembly project and the Blazor Server project, so we want to create a new project (not just put the code in one of the projects we created previously).
We can create a new project from within Visual Studio as well (to be honest, that's how I would do it) but to get to know the .NET CLI, let's do it from the command line instead.
To create a new project, follow these steps:
MyBlog folder.classlib) by typing the following command:dotnet new classlib -o Data
The dotnet...