Overview/Pre-preparation: We are going to create the code to add Dapper CRUD (Create
Read Update Delete) data with your SQL Server Database in the Blazor Environment.
This training, "Blazor + Dapper CRUD with .NET Core 3.1" is provided by Alan Simpson.
We are providing it here in written form to save time in creating CRUD features within the Blazor Environment.
The YouTube video channel can be seen at:
https://www.youtube.com/playlist?list=PLdWV84h9Uj8QHFFYAZPsgLvIhM97PDjWR.
To get all the latest code as provided by Alan Simpson, go to:
https://gethub.com/AlanSimpsonMe/BlazorDapperCRUD.
- Solution: BlazorDapperCRUD
- Project: BlazorDapperCRUD
- Database: BlazorDapperCRUDdb
- Table: Video
Installation of these tools will not be covered here
From within Visual Studio, in the top menu click "Tools" / "Get Tools and Features".
This will open the Visual Studio Installer. Then select the following 3 features.
After selection, in the lower right corner select "Install while downloading" and click "Close"
- ASP.NET and web development
- .NET Core cross-platform development
- Data storage and processing
Creating your first Blazor Project in VS with Solution -
Video 1 (time 4:15)
Installing the above VS Tools and Features (0:00)
Creating your Blazor Project (1:35)
- Open Visual Studio (VS), click "Create a new project" from right side buttons
- In Create a new project window, from dropdowns on upper right side of page, select C#, All platforms and Web
-
You should see "Blazor App" or "Blazor Server Side App",
make sure it is selected, click "Next"
-
Under Project name, Enter "BlazorDapperCRUD", Set or create Location
by clicking
on the ... and select / create a Folder location to store your files. We are going to place them at
"C:\_WebDir\ (2:06). Note, the video is placing it on the desktop.
The name of the folder will be the name of the project by default, and you do not need to create it.
Place solution and project in the same directory should NOT be checked, this is so we can add additional
projects to the Solution at another time.
Click the "Create" button
-
You should now be given the choice of "Blazor Server App" at this point, that is what you want to select.
You might be given the choice of "Blazor Assembly App", that is for another exercise. (2:30)
Make sure to unselect "Configure for HTTPS" as we are not going to worry about SSL Security for this exercise.
Click "Create"
-
The Base BlazorDapperCRUD project is now created. (2:42).
You can close the displayed BlazorDapperCRUD tab. Next, from the top menu, click Build / Build Solution.
You should see Build: 1 succeeded as the result.
-
To run the site click "IIS Express" from top menu, this will run the default Blazor App. (3:22)