Below is an exhaustive list of files and folders from the solution, in logical order. The code itself has a lot of documentation, so please refer to that if you need more information on a particular class. The object of these documentation pages is to give you an overview of all major features and how to make use of them. If you need specifics as far as how something is implemented, please consult the code.
Program.csAs with any traditional .NET application, this is the entry point to your application. If it ever happens that your app mysteriously does not start anymore, place a breakpoint in the
catchblock of the
Mainfunction to see the error.
Startup.csThis is the main driver of your application's configuration. All services, providers and configurations are registered in this file. There are a lot of comments there explaining what is being configured.
appsettings.*.jsonThese two files are your static configuration files for the system. Be sure to update your Production file before deploying your application to Azure. The entries in this file are mirrored in the classes from
Internal\Data\Configurations.cs. If you ever modify the json files, be sure to also update the classes.
Pages\_Host.cshtmlThe root Razor page. Note that is is not Blazor. This references the
App.razorThe root Razor component. You may want to customize the
<NotFound>contents for when the user navigates to an unrecognized route.
_Imports.razorA list of namespaces made available to all your Razor components. If you only use a class in one component, there is no need to put it here. Place it in the component only.
Shared\BasePage.csThe base class for all the Razor page components. When creating a new page, you should
@derivesfrom it. This will give you a consistent browser title across all pages.
Shared\MainLayout.razorThe main component layout for your application. Unless you are radically changing the layout of the application, you should not modify this file.
Shared\HeadTitle.razorA component encapsulating the
<title>tag in the html head section. This in conjunction with
BasePageis what makes the browser title consistent across all the pages.
Shared\Toolbar.razorA component containing the top bar with the hamburger button and the user dropdown (when logged in). You can add more controls here as needed.
Shared\Navigation.razorA component that encapsulates the sidebar. When adding a new page and you want it to appear in the sidebar, you will have to update this file.
Shared\Footer.razorA component that encapsulates the footer.
Pages\Index.razorThis is your landing home page. Modify it to your needs.
Pages\Account\*.razorAll pages relating to account management. If there are any UI customizations you need to make to the pages, feel free to do so.
Pages\Administration\*.razorAll pages relating to administration. If there are any UI customizations you need to make to the pages, feel free to do so.
Internal\*This is the location for all internal services. Unless you have a good reason to do so, please do not modify these classes, as they contain the core logic for the application.
Internal\Data\ApplicationDbContext.csThis is your DbContext class. Add any new entities you create as part of your application in here.
Internal\Data\Configurations.csThese classes represent the static configuration for your application. They mirror the structure in the
appsettings.*.json files. If you make a change to the json configuration, be sure to update the classes.
Internal\Data\MigrationsPlease do not touch this folder, as it container auto-generated code. More on that in the Entity Framework Core section.
Components\*.razorThese are your Blazor components. There are a few in there being used by the system, but feel free to add your own.
Components\Models\*.csThese classes are the models used by the Blazor components.
Api\Clients\Define all your http client interfaces here. More on that later.
Api\Controllers\Put any new controllers for your Api here. More on that later.
Api\Dto\Your data transfer objects that your controller methods return go here.
Table of Contents
- Initial Setup
- Project Structure
- Entity Framework
- User Interface
- Email Service
- Background Workers
- Creating a new Page
- Publishing to Azure