I am trying to utilize the Ardalis.Specification library to apply the specification pattern in my asp.net 6 project.
After installing the library, I created the following specification
public class ProductByIdsSpec : Specification
We have a working solution that uses the specification pattern to access CosmosDb using plain text SQL statements.
We are attempting to use the latest version of Ardalis.Specification (5.1.0) to do the same, but using LINQ to provide type safety in…
Using ISpecification (from the Ardalis.Specification package) in the Core layer, doesn't cause the tight coupling to a library? I think it's adding tight coupling to a specific library, and it violates OOP principles and impacts future development…
I am trying to query my postgresql database using Ef core and Ardalis Specification.
For the query I build I want to sort the results by using OrderBy with an aggregate of a property that is on a nested object.
The sorting I want is to sort the list…
I use Ardalis Specifications with Entity Framework. I wrote my app in .NET 7 and I use an onion architecture with mediatr pattern. I have a generic interface IRepository and I define it as scoped.
When I inject this variable is not null but when I…
I am implementing a soft delete for our app. To implement soft delete, I am creating ISoftDelete interface and using it to overwrite the default delete behavior of the EF by overwriting SaveChangesAsync for those entities who have implemented the…
I am new to the Ardalis.Specification library and to the Clean Architecture in general. I was wondering if there might be a way to group multiple specification classes to make a composable query. It would be helpful for complex queries involving a…
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…
In CosmosDB collection I have 2 types of entities which inherit from one base class.
I want to return base class from specification and be able to convert that base class object to concrete ones.
I don't use EF, I use CosmosDB SDK.
I want to have…
I have Query Repository
public interface IQueryRepository where T : BaseEntity
{
Task> ListAsync(ISpecification spec,
CancellationToken cancellationToken = default);
Task…
Here is my example code
private async Task> BillReconcileFundTrans(string taskId, string processId, AccountingEntryCNR aEntry, BillReconcileData data)
{
Result bprRequestRs =…
Let's say I use a ValueObject for a ZipCode, and I have a Converter to save it as a string in the database.
// EntityTypeConfiguration
builder.Property(p => p.ZipCode)
.HasConversion>()
…
I have a nested object similar to the diagram below:
Account
├─ Id
├─ Type
├─ Name
└─ Customers[]
├─ Id
├─ Name
└─ Reports[]
├─ Id
├─ Status
└─ Measurements[]
├─ Id
├─ ValueA
└─ ValueB
One of…
I'm having an issue where I try to make one endpoint for all classes that derive the same class.
One of my Core Entities is called Cell and has many deriving types such as ImageCell, VideoCell and so on.
The project is implemented using…
How can I use Union All on different entities using Ardalis CleanArchiteture ?
Example is if I have Product and ProductKit, they have different structures and are different entity.
Is there a way to use Ardalis Repository Specification and union all…