Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jbogard/ContosoUniversityDotNetCore-Pages
With Razor Pages
https://github.com/jbogard/ContosoUniversityDotNetCore-Pages
Last synced: about 2 months ago
JSON representation
With Razor Pages
- Host: GitHub
- URL: https://github.com/jbogard/ContosoUniversityDotNetCore-Pages
- Owner: jbogard
- License: mit
- Created: 2018-02-20T15:10:34.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-27T14:48:08.000Z (almost 2 years ago)
- Last Synced: 2024-11-05T03:42:35.744Z (about 2 months ago)
- Language: C#
- Size: 4.74 MB
- Stars: 1,345
- Watchers: 91
- Forks: 293
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![CI](https://github.com/jbogard/ContosoUniversityDotNetCore-Pages/workflows/CI/badge.svg)
# ContosoUniversity on ASP.NET Core 6.0 on .NET 6 and Razor Pages
Contoso University, the way I would write it.
This example requires some tools and PowerShell modules, you should run `setup.cmd` or `setup.ps1` to install them.
To prepare the database, execute the build script using [PSake](https://psake.readthedocs.io/): `psake migrate`. Open the solution and run!
## Things demonstrated
- CQRS and MediatR
- AutoMapper
- Vertical slice architecture
- Razor Pages
- Fluent Validation
- HtmlTags
- Entity Framework Core## Migrating the Database
Grate will automatically create or upgrade (migrate) the database to the latest schema version when you run it:
From PowerShell:
```
invoke-psake migrate
```From CMD:
```
psake migrate
```When running unit tests, you can recreate the unit test database using:
```
invoke-psake migratetest
```## Versioning
Version numbers can be passed on the build script command line:
From PowerShell:
```
invoke-psake CI -properties ${'version':'1.2.3-dev.5'}
```Because we're passing a PowerShell dictionary on the command line, the cmd script doesn't handle this very nicely.
Or generate a version using [GitVersion](https://gitversion.net/docs/) locally:
```
psake localversion
```
will generate a semantic version and output it.