Code Monkey home page Code Monkey logo

dddinpracticene6's Introduction

DDDInPractice course sample code

This is .Net6 with EF Core update to Domain-Driven Design in Practice course sample by Vladimir Khorikov

Solution structure

I implemented different solution structure than the original sample solution. My solution is structured as the following

  • Domain project: For all domain entities with their business logic. It is netstandard2.1 project
  • Data project: For data access (DbContext & repositories implementations) & migrations (EF Core migrations) infrastructure.
  • WpfClient project: For UI using WPF and MVVM.
  • Domain.Tests project: For Domain unit tests using xUnit

I used Visual Studio 2022 with .Net6. The DddInPractice.Domain project is using netstandard2.1.

You can find a a quick intro at blog post.

Running the solution

  1. Update connection string
  2. You need to set up the database first using EF Core
  3. Run the solution with WpfClient project as your startup project.

Connection string is hardcoded in:

  • DddInPractice.Data/SqlServerDesignTimeDataContextFactory
  • DddInPractice.WpfClient/App.xaml.cs

To run database migrations. You need to have EF Core tools installed. Use this .Net CLI command.

Check If you have EF Core command-line tools: dotnet ef

Install EF Core command-line tools: dotnet tool install --global dotnet-ef

Run Db Migrations for the solution: dotnet ef database update --project src/DddInPractice.Data --startup-project src/DddInPractice.Data

Note that the above command assumes you are running the command from within the solution folder.

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.