-
Notifications
You must be signed in to change notification settings - Fork 255
Open
Description
We expose the WithSpecification extension which applies the specification to any IQueryable source, refer to the docs for more details.
We might go one step further and add some convenience extension methods covering some common use cases, e.g. FirstOrDefaultAsync, SingleOrDefaultAsync, etc. We already have such an extension ToListAsync, which is actually necessary considering the PostProcessingAction. But, we can expand to that and cover more methods.
Example
Current usage:
var customer = await dbContext.Customers
.WithSpecification(spec)
.FirstOrDefaultAsync(cancellationToken);Proposed:
var customer = await dbContext.Customers
.FirstOrDefaultAsync(spec, cancellationToken);KyleMcMaster
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request