Clean Architecture with ASP.NET Core 3.0 • Jason Taylor • GOTO 2019

GOTO Conferences · 253K views · 2020 · 50:47

Open on YouTube

Software architecture & designWeb developmenttalk

Why Stack Overflow recommends it

Stack Overflow users link it when asking or answering questions about Clean Architecture in .NET, such as EF Core entity design, layering, DTOs, and abstractions like a DateTime service.

Recommended by 3 people across 3 different months, 2020 to 2022.

What it is

A GOTO Copenhagen 2019 conference talk by Jason Taylor, a solution architect at SSW, on structuring enterprise ASP.NET Core 3.0 applications with Clean Architecture. It covers project and folder organisation, tooling, and design choices aimed at keeping a system simple to build and maintain.

What people said

Recommends Leaky · 2021-03 · Stack Overflow · on “Is it appropriate to use IHttpcontextAccessor in service layer?”

In my experience, in ASP.NET developers tend not to worry much about these segregation concerns (nor about e.g. anemic domains). In most systems, especially smaller ones, there is a lot of coupling between the business logic and the API; for example through the use of filters and middleware. So, in this sense it can be seen as 'appropriate', as long as it doesn't block you from an important project requirement, for example being able to run the application core independently of the API. But if you want to architect your solution in a decent and modern way, it makes sense to avoid doing things like this. Straightforward solution One straightforward solution is to extract the given data into a

Recommends JHBonarius · 2021-04 · Stack Overflow · on “EF Core entity classes and Clean architecture”

Although a valid question, I think the answer to this question will always be opinionated. Anyhow, I liked this presentation on clean architecture [this video] . It also suggests to use the EF fluent API, because (according to the presenter) it's more powerful. I'm not fully sure on this myself.

Recommends H-a-Neo · 2022-06 · Stack Overflow · on “Abstracting Data Access Layer with Entity Framework code first”

I guess you tumbled between selecting right architecture for a given solution. a software must be created for meet the business needs. so depending on the business, complexity of the domain, we have to choose the write architecture. Microsoft elaborated this in a detail PDF you will find it here [LINK] You want some level of abstraction between your Data and the BL then "N-Layer" architecture is not the best solution. even though i am not telling the N-Layer entirely out dated but there is more suitable solutions for this problem . And if you using EF or EF core then there is no need to implement Repository cus EF itself contain UOW and Repositories. Clean Architecture introduce higher level

Cites khaled Dehia · 2020-12 · Stack Overflow · on “How does an interface remove dependency from implementation?”

How is that true? If in the future the Presenter layer needs more or different data to be sent by the Use Cases, you not only will have to modify the Presenter, but the OutputBoundary Interface and the Use Cases as well. So no, the Use Cases are never completely independent from the Presenter. The answer is yes and no Yes it is true since all layers pointing inwards not outwards which make the communication between layers based on interfaces/abstraction the application layer as example will implement all the code against the interface and not aware with the implementation of that interface but since the higher layer pointing inward so it will consume the interface of the lower layer then imp

Cites Ortiga · 2021-08 · Stack Overflow · on “C# Web API - Is there a better alternative to Data Transfer Object?”

DTO is meant to transfer data between layers, while reducing coupling between said layers. An alternative to DTOs is by not using layers. An example of unlayered architecture is called Vertical Slice [LINK] or sometimes refered as Clean Architecture [this video] .

Cites Roomey · 2022-02 · Stack Overflow · on “Why do I need to create a DateTime service which returns DateTime.Now instead of using DateTime.Now directly?”

I have been watching Jason Taylor presentation about Clean Architecture with ASP.NET Core (timing 35:52) [this video] And he created a DateTimeService which returns DateTime.Now and registered via AddTransient method, he suggests using it instead of using DateTime.Now directly because in this case he doesn't have a dependency on the machine clock. It's not clear to me why he doesn't have a dependency in this case, could you please explain how it works?