Questions tagged [ardalis-cleanarchitecture]

Apply to questions that specifically relate to the Ardalis.CleanArchitecture solution template and its associated guidance.

See Ardalis.CleanArchitecture GitHub Repo

Appropriate Questions:

  • How do I use this template?
  • Where do I put (something) in my app that uses this template?
  • How do I extend this template to do (something)?

Inappropriate Questions:

  • Bug reports (use the GitHub repo)
  • Feature requests (use the GitHub repo)
  • General discussion (use Twitter or another medium)
34 questions
4
votes
1 answer

Clean Architecture (DDD) Why are domain objects (DB Entitites) and DbContext in separate projects?

I understand the need for abstraction and separating concerns and unit tests, however, it seems to me that separating entities and context into 2 projects is slight overengineering? I could be missing something really, but is this because you want…
3
votes
2 answers

Inject signalr hub only by interface

So recently I started a project with Ardalis Clean Architecture as template it was all nice but when signalR came into my project i can't figure it. I'm trying to inject interface that my hub implements and call it's method, but everytime when it's…
ISmellYu
  • 89
  • 1
  • 7
2
votes
1 answer

How to a raise a domain event for the entity when the entity is created in clean architecture

I have a project created using the clean architecture template. If I want a domain event be raised when a new project is created, where do I add that? If I have to raise an event whenever a new item be added to a project, I can accomplish that in…
VivekDev
  • 20,868
  • 27
  • 132
  • 202
2
votes
1 answer

NewItemAddedEvent is not Handled

I was reading the Clean Architecture Code and I realized the NewItemAddedEvent in (Clean.Architecture.Core) is not handled, and it's only used on tests. Is there a reason why it's created as an event and left unhandled? what's its purpose on test?
John Nyingi
  • 951
  • 1
  • 16
  • 36
1
vote
2 answers

Why `ardalis/CleanArchitecture` reference FastEndpoints but not it's own `ardalis/ApiEndpoints`

Just need a clarification. I was keen on referencing ApiEndpoints in one of my projects. But when I am browsing the ardalis/CleanArchitecture repo I noted it has been using FastEndpoints ref. The question is why they have deviated from their own…
1
vote
0 answers

Entity Framework how to setup relationships with Inheritance types

I currently have the following classes in my EF based project. Data is stored in a SQL Database using the Table per Hierarchy (TPH) configuration : class Lot { Building building ... } class Building { string name {get; set;} …
1
vote
0 answers

Versioning ardalis api endpoints

I would like to ask.. (Questions are directly directed to StackOverflow: https://github.com/ardalis/ApiEndpoints/issues/new/choose) Is there any good way versioning ardalis api endpoints? Default documentation suggests to store route in Request as…
Tomáš Filip
  • 727
  • 3
  • 6
  • 23
1
vote
1 answer

gRPC and clean architecture - Where to place proto files

I'm using grpc in the asp.net project with clean architecture, where should I put proto files and grpc services which layer, and which folder
1
vote
1 answer

Select only needed field with ListAsync in Ardalis Clean Architecture

All - I have got two questions regarding the repository pattern used in the Ardalis CleanArchitecture. With ListAsync how can I project to only a few fields not to all of them? Example: if I have 20+ fields in the table & I need only 3 fields to…
My Helper
  • 707
  • 1
  • 10
  • 20
1
vote
0 answers

Transaction and DomainService Types

I'm trying to develop enterprise application with asp.net core in microservice with onion arch and I have some question about domain service (my purpose is to specify business implementation place which is related to transactions and other type of…
M-AMIN
  • 11
  • 2
1
vote
0 answers

Ardalis CleanArchitecture - BaseEntity & Composite Keys for AggregateRoots

What is the recommendation for extending BaseEntity as an AggregateRoot is I need to have a composite Key? Essentially I need to be able to manage an Entity that would normally be configured in EFCore like: builder.HasKey(z => new { z.PartA, z.PartB…
pseabury
  • 1,615
  • 3
  • 16
  • 30
1
vote
1 answer

How to access EF functionalities in Clean architecture and .NET core

The EF core includes functionalities that you may want to use for complex queries. For example AsNoTracking(), SumAsync, MaxAsync or finding changed/modified entities etc. are available in Microsoft.EntityFrameworkCore assembly In clean…
1
vote
2 answers

Purpose of a dedicated "Solution Items" project in .sln file

I was looking at the .sln file generated from the template at https://github.com/ardalis/CleanArchitecture, and noticed there is this part: Project("{UUID-1}") = "src", "src", "{UUID-2}" EndProject Project("{UUID-1}") = "tests", "tests",…
Zizheng Tai
  • 6,170
  • 28
  • 79
1
vote
1 answer

How to dealing with multy source Database using DbContext

I used clean arch steps to create the project, but the problem that i have more then three aggregate that i need to put them in referents Database. I tried to use DbContext for each aggregate like this: public class AppDbContext : DbContext { …
1
vote
1 answer

How to are Domain Events ignored from Migrations in Ardalis CleanArchitecture?

For references: https://github.com/ardalis/CleanArchitecture The BaseEntity model contains a List. This list is being ignored in when doing EF Migrations. public abstract class BaseEntity { public int Id { get; set; } public…
Sebastian
  • 158
  • 1
  • 1
  • 11
1
2 3