OnionArch.Mvc 0.0.2

ASP.NET Core MVC using the onion architecture and feature folders

There is a newer version of this package available.
See the version list below for details.
Install-Package OnionArch.Mvc -Version 0.0.2
dotnet add package OnionArch.Mvc --version 0.0.2
<PackageReference Include="OnionArch.Mvc" Version="0.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OnionArch.Mvc --version 0.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

OnionArch

A .NET Core demo application which uses the Onion Architecture

Licence Used

License: MIT

See the contents of the LICENSE file for details

Pull Requests

PRs Welcome

Pull requests are welcome, but please take a moment to read the Code of Conduct before submitting them or commenting on any work in this repo.

Code of Conduct

OnionArch has a Code of Conduct which all contributors, maintainers and forkers must adhere to. When contributing, maintaining, forking or in any other way changing the code presented in this repository, all users must agree to this Code of Conduct.

See Code of Conduct.md for details.

NuGet Package

This project is now available as a NuGet package

Running The Application

  1. Ensure that the appsettings.json file contains a valid ConnectionStrings section.

You will need two connection strings:

  • onionDataConnection

This is the database which will contain all of the Book and Series information

  • onionAuthConnection

This is the database which will contain all of the ASP.NET MVC Core auth information.

Example ConnectionStrings section:

"ConnectionStrings": {
  "onionDataConnection": "DataSource=onionData.db",
  "onionAuthConnection": "DataSource=onionAuth.db"
},
  1. Open a command prompt in the Onion.Web directory

Issue the following commands to set up the databases:

dotnet restore

Check for migrations in the Onion.Repo.Identity directory. If there isn't a directory labelled Migrations, then run the following (from the Onion.Web) directory to generate them:

dotnet ef migrations add CreateIdentitySchema -c AppIdentityDbContext -p ../Onion.Blog.Repo/Onion.Blog.Repo.csproj -s Onion.Blog.Web.csproj

Similarly, check for migrations in the Onion.Repo.Data directory. If there isn't a directory labelled Migrations, then run the following (from the Onion.Web) directory to generate them:

dotnet ef migrations add InitialMigration -c DataContext -p ../Onion.Blog.Repo/Onion.Blog.Repo.csproj -s Onion.Blog.Web.csproj

Apply all migrations to the databases by running the following commands (from the Onion.Web directory):

dotnet ef database update -c DataContext -p ../Onion.Repo/Onion.Repo.csproj -s Onion.Web.csproj
dotnet ef database update -c AppIdentityDbContext -p ../Onion.Repo/Onion.Repo.csproj -s Onion.Web.csproj
  1. Run the application and seed the database

Issue the following command from the Onion.Web directory:

dotnet run

OnionArch

A .NET Core demo application which uses the Onion Architecture

Licence Used

License: MIT

See the contents of the LICENSE file for details

Pull Requests

PRs Welcome

Pull requests are welcome, but please take a moment to read the Code of Conduct before submitting them or commenting on any work in this repo.

Code of Conduct

OnionArch has a Code of Conduct which all contributors, maintainers and forkers must adhere to. When contributing, maintaining, forking or in any other way changing the code presented in this repository, all users must agree to this Code of Conduct.

See Code of Conduct.md for details.

NuGet Package

This project is now available as a NuGet package

Running The Application

  1. Ensure that the appsettings.json file contains a valid ConnectionStrings section.

You will need two connection strings:

  • onionDataConnection

This is the database which will contain all of the Book and Series information

  • onionAuthConnection

This is the database which will contain all of the ASP.NET MVC Core auth information.

Example ConnectionStrings section:

"ConnectionStrings": {
  "onionDataConnection": "DataSource=onionData.db",
  "onionAuthConnection": "DataSource=onionAuth.db"
},
  1. Open a command prompt in the Onion.Web directory

Issue the following commands to set up the databases:

dotnet restore

Check for migrations in the Onion.Repo.Identity directory. If there isn't a directory labelled Migrations, then run the following (from the Onion.Web) directory to generate them:

dotnet ef migrations add CreateIdentitySchema -c AppIdentityDbContext -p ../Onion.Blog.Repo/Onion.Blog.Repo.csproj -s Onion.Blog.Web.csproj

Similarly, check for migrations in the Onion.Repo.Data directory. If there isn't a directory labelled Migrations, then run the following (from the Onion.Web) directory to generate them:

dotnet ef migrations add InitialMigration -c DataContext -p ../Onion.Blog.Repo/Onion.Blog.Repo.csproj -s Onion.Blog.Web.csproj

Apply all migrations to the databases by running the following commands (from the Onion.Web directory):

dotnet ef database update -c DataContext -p ../Onion.Repo/Onion.Repo.csproj -s Onion.Web.csproj
dotnet ef database update -c AppIdentityDbContext -p ../Onion.Repo/Onion.Repo.csproj -s Onion.Web.csproj
  1. Run the application and seed the database

Issue the following command from the Onion.Web directory:

dotnet run

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
0.0.4 2,606 4/25/2018
0.0.3 222 4/24/2018
0.0.2 222 4/23/2018
0.0.1 231 4/23/2018