Category Archives: GitHub

CarShop .NET Core Blazor Project – Part 5

Following on from Part 4, where I provided the links to the CarShop views SQL, I have now published the C# project which defines the data model classes for the CarShop database tables and views. The data classes project has been separated into it’s own project as this will be shared as a dependency with the CarShop Blazor Server project and in future, I will develop the API’s in a separate project.

The project has been published on my GitHub repo here.

You can also follow the guidance from Microsoft to create model classes with the Entity Framework, documented here.

Advertisement

CarShop .NET Core Blazor Project – Part 4

Following on from Part 3, where I provided the links to the CarShop database seeding SQL, I have now published the database view SQL scripts in my public GitHub repo. At present there are two database views.

The database view scripts are listed below.

1 – CarModels_View.sql – provides view of car manufacturers and models.
2 – Vehicles_View.sql – provides a view of vehicles with column data vs foreign key identifiers

The CarShop database view SQL scripts can be found in my GitHub repo here.

It is likely that over the course of developing the project, the number of views will expand, hence the reason to separate out the location of the view SQL scripts as apposed to the database mode creation or data seeding SQL scripts.

CarShop .NET Core Blazor Project – Part 3

Following on from Part 2, where I provided the link to the CarShop schema deployment SQL, I have now published the database seeding scripts in my public GitHub repo, for the initial supporting data. At present there are six tables in the database which have data seeding scripts.

The data seeding scripts are listed below.

1 – EngineSize.sql – Inserts a list of engine sizes into the EngineSize table.
2 – Salutation.sql – Inserts a list of salutations for customers into the Salutation table (only basic salutations are loaded)
3 – CarFuelType.sql – Inserts the car fuel types for vehicles into the CarFuelTypes table
4 – CarColour.sql – Inserts a basic list of car colours into the CarColours table
5 – CarManufacturers.sql – Inserts a basic list of car manufacturers into the CarManufacturers table
6 – VehicleStatus.sql – Inserts a list of Vehicle status flags into the VehicleStatus table.

The CarShop data seeding SQL scripts can be found in my GitHub repo here.

CarShop .NET Core Blazor Project – Part 2

Following on from Part 1, where I introduced the CarShop project, I have now published the database scripts in my public GitHub repo, for the data model. At present there are nine tables in the database schema, which need to be created in a specific order to maintain relationships. The tables are listed below.

CarManufacturers – Table to hold all car manufacturer details

CarModels – Table to hold all car models

VehicleStatus – Table to hold the vehicle status e.g. “For Sale”

CarFuelTypes – Table to hold the fuel type for a vehicle

CarColours – Table to hold the car colours

Engine Size – Table to hold all car engine sizes

Vehicles – Table to hold all car vehicle details which has relationships to the above tables as per the Part 1 CarShop project blog post showing the schema diagram.

Salutations – Table to hold all customer salutations

Customers – Table to hold all customer details which has a relationship with Salutations

Some of the tables hold default e.g. Vehicles previous owners has a default of 1 since the vehicles are not new at the Carshop.

The CarShop model SQL scripts can be found in my GitHub repo here.

My Public Code Repository on GitHub

For a while now, I have been adding code inline within my blob posts. I’ve now released a public repository on GitHub, which I will be using moving forward to publish all my community shared code, free for use with the MIT license.

I will start to publish my previous code into the public repository, for now I’ve published a recent .NET 5 console app which is a basic RSS reader that currently reads the .NET teams RSS feed. My public repository can be found below.

Tejinder Rai on GitHub