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
1
vote
1 answer

How To Manage Guard.Against.NotFound for IAggregateRoot

I was wondering if we want to check for adding new item if projectId exist in db, shell we somehow in AddItem method to insert Guard.Agains.NotFound(???) or not? I'm asking because if create some entity: public class Country : BaseEntity,…
1
vote
1 answer

In AutoFac, why does the order of RegisterGeneric calls for my generic repositories only work correctly for the last one registered?

I am working on a .NET 5 targeted ASP.NET API where I need to access three different SQL databases. I am using AutoFac as my DI (disclaimer: I am new to AutoFac and have only used the ASP.NET Core build in DI in the past). I am also using the…
1
vote
1 answer

Clean Architecture - In ASP.NET MVC - Which layer I use to write the ViewModels?

The question is very simple, I am using Clean Architecture for a project(web site) by using ASP.NET MVC. I download the Clean Architecture template sample code written by Ardalis from GitHub. In that specific template, the writer didn't use the…
0
votes
0 answers

Cant validate JWT

.netcore 6 project, Getting jwt from identity server, which looks fine in jwt.io HEADER: { "alg": "RS256", "kid": "4716390B357D1DA43908ABA78925B3A2", "typ": "at+jwt" } PAYLOAD: { "iss": "http://....com", "nbf": 1693215898, "iat":…
TyForHelpDude
  • 4,828
  • 10
  • 48
  • 96
0
votes
1 answer

How to query a secondary model when using DDD?

I am trying to implement DDD into my ASP.NET Core app using Ardalis' clean architecture template which has some helpers for Aggregates and Repositories. One of the things it does is force you to only use repositories for aggregate roots, which is…
0
votes
1 answer

How to Organize ASP.NET Core Web API and React + TypeScript Vite Application in a Project (Using Clean Architecture Template by Ardalis)?

Description: I have started a new project that involves building a web application using ASP.NET Core for the backend and React + TypeScript with Vite for the frontend. For structuring the project, I am following the Clean Architecture template by…
0
votes
1 answer

NU1101 Unable to find package Pluralsight.DDD.Deps. No packages exist with this id in source(s): Microsoft Visual Studio Offline Packages, nuget.org

I am trying to learn a course in pluralsight https://app.pluralsight.com/library/courses/fundamentals-domain-driven-design/table-of-contents and I have a demo application for the course available at…
0
votes
0 answers

Why am I getting empty responses when using Ardalis Api Endpoints?

I am implementing a new API using ARDALIS api endpoints, I just finished the set up for the project, but for some reason the first endpoint implemented always returns empty responses. Although, my database is full of data. This is the endpoint which…
Uribe2304
  • 51
  • 1
  • 8
0
votes
0 answers

How to update database first EF Core Entities that are in different folders

Firstly I scaffolded my database and it created model classes in a folder for the tables. I am working with the folders organized in such a way that each entity is separated, one in each folder. When I modified the database and ran the scaffolding…
0
votes
0 answers

No suitable constructor was found for entity type

I'm building an application in .NET7 with the ardalis/clean-architecture template. I spent yesterday modeling my models, and now I'm trying to migrate so that I can seed data and test some functionalities but I keep getting the error No suitable…
0
votes
0 answers

AmbiguousMatchException: The request matched multiple endpoints

I am using the Ardalis Clean Architecture for one of my projects. I am getting the above-mentioned error if I have the same action method (for example: Edit) in more than one controller and I try to call that method from anywhere. But if I add the…
0
votes
1 answer

Why using Directory.Packages.props for non CPM related settings

Recently TreatWarningsAsErrors and TargetFramework moved into Directory.Packages.props. While I can totally understand why it‘s now configured at a central place I‘m unsure why it moved to the CPM related file. Isn‘t this something that should be…
Mik4sa
  • 33
  • 1
  • 6
0
votes
0 answers

How clean architecture project web get reference of core project

I m really curious about to know how you core project class can be called into web project, I see there is no reference project called in Project Reference only showing Infrastructure project? how it is working? I tried multiple time in other…
0
votes
0 answers

How do I update migrations?

Im getting an error when running this command "dotnet ef database update -p StudieApp.Infrastructure -s StudieApp.Web" my connection string has this format "Data Source=server:port;Initial Catalog=database;User ID=user;Password=password" However, im…
0
votes
2 answers

clean architecture - extensions place

I'm using clean architecture in asp.net core where should I put the extensions method folder