Giter Site home page Giter Site logo

contosouniversitydotnetcore's Introduction

ContosoUniversity on ASP.NET Core with .NET Core

Contoso University, the way I would write it.

To run, create a database "ContosoUniversity" and run the SchemaAndData.sql script against it. Modify the connection string in appsettings and go!

Things demonstrated

  • CQRS and MediatR
  • AutoMapper
  • Feature folders and vertical slices
  • HtmlTags
  • Entity Framework Core

How to run

First run the build script (Build.ps1). This will set up the local database using RoundhousE. Open the solution and run!

contosouniversitydotnetcore's People

Contributors

chrisrichards avatar jbogard avatar paulvanbladel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contosouniversitydotnetcore's Issues

Update to .NET Core 3.1

I have forked this project and updated it to 3.1
Is it ok to add a pull request with the update?

Feature Folder

How do you define features?
For example, a course will always have an instructor. But in your example, you separate them as a feature

Interlocked on Linux containers

Just wondering if you've had any issues with this BCL api on Linux. We're getting failing tests in CI in docker builds on Linux due to uniqueness constraints when we use Interlocked.Increment to generate uuids in all kinds of places (think email address columns, slug columns, etc).

Quick google seems to suggest this API might rely on hardware support, but I need to do more reading.
https://stackoverflow.com/questions/149710/interlocked-equivalent-on-linux
https://stackoverflow.com/questions/5700100/what-is-interlocked-increment-actually-doing

Redirect to action in another controller?

Hi Jimmy,

In ControllerExtensions you have method RedirectToActionJson, and you create url for redirect on this way: redirect = controller.Url.Action(action). You are using it like this:
return this.RedirectToActionJson(nameof(Index));

This will not work if you want to redirect on action from another controller.
Mu solution is to change:
redirect = controller.Url.Action(action) to redirect = action
and then to call it:
return this.RedirectToActionJson(Url.Action("Action", "Controller"));

Do you maybe have some better suggestion?

Navigating to home about page throws error

Since all controller actions are wrapped by DbContextTransactionFilter, the current sql command throws error

  • add using Microsoft.EntityFrameworkCore.Storage;
  • set command.Transaction = _context.Database.CurrentTransaction.GetDbTransaction();
  • remove try finally
  • remove await conn.OpenAsync();

Feature folders in singular or plural?

Hi Jimmy,

I am using 'Features' organization on my project, and in first I named features in singular. But I had problem because feature folder name was the same like domain object name. (domain object User, and feature folder User).
I saw that in this project you are using plural for feature folders, but also I see that in your other project (https://github.com/jbogard/ContosoUniversityCore) you are using singular.
Did you have similar problems or you start using plural for some other reasons?
And what is better in your opinion?
Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.