Call Us: +32 2 466 00 16
Email: info@u2u.be
Follow Us:

Domain Driven Design with Entity Framework Core

2days
Training code
UDEF
Book this course

Domain Driven Design

Introduction to Domain Driven Design

Getting the software right is a hard thing to do. This is because business and developers do not always talk the same language. Domain Driven Design is all about getting the language right between them.

  • What is Domain Driven Design?
  • Advantages of using Domain Driven Design.
  • When is Domain Driven Design a bad option?
  • Anti-Pattern: Big Ball of Mud.
  • Anti-Pattern: Death by a Thousand Dots.

Strategic Design

One of the core pillars of DDD is Strategic Modeling. Strategic modelling helps you at defining the Bounded contexts, the Ubiquitous Language and Context Maps.

  • The linguistic delimitation that are Bounded Contexts
  • Identifying the terms and concepts with the Ubiquitous Language
  • Relating Bounded Contexts with Context Maps
  • Applying Strategic Design to a real world business case

Tactical Design

When constructing the domain model, there are several approaches. Tactical Design provides a set of technical resources that are used in the construction of the domain model. The goal is to enrich your domain model by applying these standards correctly. When done so, it will reflect your business model with more clarity.

  • Differentiating between Entities and Value Objects
  • Clustering Entities and Value Objects with Aggregates
  • Providing domain specific operations with Services
  • Data storage by using Repositories
  • Abstracting the creation of Entities, Value Objects and Aggregates with Factories
  • Publishing significant domain changes with Events
  • Segregating concepts using Modules
  • Applying Tactical Design to a real world business case

Architecting Modern Web Applications

So what is a modern web application? One that uses Angular and TypeScript? With the speed that modern web application developement evolves, there is the chance that your web site uses 'old' technology by the time it is done. But sound architecture never goes stale. As a wise man once said: 'If you think good architecture is expensive, try bad architecure'.

  • "Clean" Architecture: put the business and application model at the center.
  • Understanding the Core, Infrastructure and Presentation layer.
  • Testing everything with Clean Architecture.

Entity Framework

Introduction to Entity Framework

When a database is designed, the idea is to normalize data, i.e. avoid duplicate data. When designing the object model for an application you try to come up with a design which is best suited for solving your business problems. This means that mapping tables to classes one-on-one is often a bad idea. Entity Framework allows us to map the relational world to the world of objects, allowing more complex mapping.

  • What is Entity Framework?
  • The need for Object Relational Mapping, especially with inheritance
  • Decoupling conceptual data structure from logical data structure
  • Querying data: APIs and LINQ

Entity Framework Core

With .NET Core also comes Entity Framework Core. A new implementation of EF, which can run cross-platform, on Windows, Mac and Linux.

  • Scaffolding your project from an existing database
  • Understanding the Generated code
  • Interacting with the database

Modeling your database with EF Core

When mapping your database with EF Core, one must be aware that conventions are being applied, like Fluent API. This module will discuss how to use Fluent API within EF Core.

  • Methods of configuration
  • Creating and applying migrations
  • Table and column mapping
  • Modeling properties
  • Value generated properties
  • Using Owned and Shadow Properties.
  • Concurrent updates
  • Modeling relationships.
  • Mapping inheritance.

Mapping DDD to EF.

Domain Driven Design is a great way to start designing your applications. Entity Framework Core is a great framework to access and manipulate your data, stored in databases. Now, how can we fit Entity Framework Core into the concepts of Domain Driven Design?

  • DDD and Persistance Ignorance
  • Implementing Value Objects with Owned Properties
  • Using Shadow Properties to Avoid 'Leaky Abstractions'
  • Building Repository and Specification classes
  • Testing your Specifications
  • Entity Validation

Mapping Domain Entities to EF Entities

When working with the Domain on the one hand, and Entity Framework on the other hand. There will be situations in which you need to segregate your domain entities from your EF entities. This module will discuss the situations in which segregation is required and how one can implement this.

  • No more 'Death by a Thousand Dots'
  • Using AutoMapper to convert between domain and EF entities
  • Building Proper Services
  • Choosing the right layer for your service implementation

When architecting and developing applications, there are several approaches that could be considered where Domain-Driven Design (DDD) is one of them. The idea of domain-driven design is to let the software orginate from the so-called domain. By doing so, one tries to create software that perfectly mimiques the domain it was created for. On the other hand, when creating business applications, there is often a need for a data access layer to some database. This is where Entity Framework (EF) Core jumps in. In fact, domain-driven design and EF Core can perfectly go hand in hand. This course will discuss the concepts of domain-driven design and how EF Core can help you at implementing these concepts. Building a large website can turn into a very complex project if you're not careful, so we will split our solution into layers. Best practices today is using an archecture approach called "Clean Architecture", which separates your solution into different layers with maintainance and testing in mind. Participants learn about modern architecture and will get a hands-on approach to building a web site using DDD and EF Core.

Attendees are required to have prior knowledge of C#/VB.NET and ASP.NET.

© 2019 U2U All rights reserved.