Skip to content

sven73a/ContosoUniversityDotNetCore-Pages

 
 

Repository files navigation

CI

ContosoUniversity on ASP.NET Core 3.1 on .NET Core 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: 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

RoundHousE 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 locally:

psake localversion

will generate a semantic version and output it.

About

With Razor Pages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 77.4%
  • HTML 16.3%
  • TSQL 3.0%
  • PowerShell 2.3%
  • CSS 0.7%
  • Batchfile 0.2%
  • JavaScript 0.1%