Skip to content

Commit 604959c

Browse files
authored
Updated Readme files. (#453)
1 parent 0a3ee27 commit 604959c

File tree

2 files changed

+11
-42
lines changed

2 files changed

+11
-42
lines changed

README.md

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
[![NuGet](https://img.shields.io/nuget/v/Ardalis.Specification.svg)](https://www.nuget.org/packages/Ardalis.Specification)[![NuGet](https://img.shields.io/nuget/dt/Ardalis.Specification.svg)](https://www.nuget.org/packages/Ardalis.Specification)
2+
[![NuGet](https://img.shields.io/nuget/v/Ardalis.Specification.svg)](https://www.nuget.org/packages/Ardalis.Specification)
33
[![Actions Status](https://github.com/ardalis/Specification/actions/workflows/ci.yml/badge.svg)](https://github.com/ardalis/Specification/actions/workflows/ci.yml)
44
[![Generic badge](https://img.shields.io/badge/Documentation-Ardalis.Specification-Green.svg)](https://ardalis.github.io/Specification/)
55

@@ -23,36 +23,9 @@ Base class with tests for adding specifications to a DDD model. Also includes a
2323

2424
### [Read the Documentation](https://ardalis.github.io/Specification/)
2525

26-
### Videos
26+
## Releases
2727

28-
🎥 [Watch What's New in v5 of Ardalis.Specification](https://www.youtube.com/watch?v=gT72mWdD4Qo&ab_channel=Ardalis)
29-
30-
🎥 [Watch an Overview of the Pattern and this Package](https://www.youtube.com/watch?v=BgWWbBUWyig)
31-
32-
## Version 7 Release Notes
33-
34-
Version 7 is now available on NuGet.org! We have had a lot of confusion about the need to have the version of Ardalis.Specification (and/or the EF6/EFCore packages) match the consuming project's version of .NET. We intend to version this package more frequently in the near future to make it clear that it need not match.
35-
36-
### Breaking Changes
37-
38-
* Updated projects, drop support for old TFMs. by @fiseni in https://github.com/ardalis/Specification/pull/326
39-
40-
### Other updates
41-
42-
* Patch 2 by @davidhenley in https://github.com/ardalis/Specification/pull/283
43-
* Fix `Just the Docs` link in docs home page by @snowfrogdev in https://github.com/ardalis/Specification/pull/293
44-
* Update url path by @ta1H3n in https://github.com/ardalis/Specification/pull/303
45-
* Implement SelectMany support by @amdavie in https://github.com/ardalis/Specification/pull/320
46-
* Add two methods for consuming repositories in scenarios where repositories could be longer lived (e.g. Blazor component Injections) by @jasonsummers in https://github.com/ardalis/Specification/pull/289
47-
* Added support for AsAsyncEnumerable by @nkz-soft in https://github.com/ardalis/Specification/pull/316
48-
* Lamadelrae/doc faq ef versions by @Lamadelrae in https://github.com/ardalis/Specification/pull/324
49-
* Update the search feature to generate parameterized query. by @fiseni in https://github.com/ardalis/Specification/pull/327
50-
* Add support for extending default evaluator list by @fiseni in https://github.com/ardalis/Specification/pull/328
51-
* Ardalis/cleanup by @ardalis in https://github.com/ardalis/Specification/pull/332
52-
53-
## Version 6 Release Notes
54-
55-
See [Releases](https://github.com/ardalis/Specification/releases/tag/v6.1.0)
28+
The change log for `version 9` and the list of breaking changes can be found [here](https://github.com/ardalis/Specification/issues/427).
5629

5730
## Sample Usage
5831

@@ -63,12 +36,8 @@ Example implementation in your repository using specifications
6336
```c#
6437
public async Task<List<T>> ListAsync(ISpecification<T> specification, CancellationToken cancellationToken = default)
6538
{
66-
return await ApplySpecification(specification).ToListAsync(cancellationToken);
67-
}
68-
69-
private IQueryable<T> ApplySpecification(ISpecification<T> specification)
70-
{
71-
return SpecificationEvaluator.Default.GetQuery(dbContext.Set<T>().AsQueryable(), specification);
39+
var query = SpecificationEvaluator.GetQuery(DbContext.Set<T>(), specification);
40+
return await query.ToListAsync(cancellationToken);
7241
}
7342
```
7443

@@ -80,11 +49,7 @@ var customers = await _repository.ListAsync(spec, cancellationToken);
8049
```
8150
Specifications should be defined in an easily-discovered location in the application, so developers can easily reuse them. The use of this pattern helps to eliminate many commonly duplicated lambda expressions in applications, reducing bugs associated with this duplication.
8251

83-
We're shipping a built-in repository implementation [RepositoryBase](https://github.com/ardalis/Specification/blob/main/Specification.EntityFrameworkCore/src/Ardalis.Specification.EntityFrameworkCore/RepositoryBaseOfT.cs), ready to be consumed in your apps. You can use it as a reference and create your own custom repository implementation.
84-
85-
## Running the tests
86-
87-
This project needs a database to test, since a lot of the tests validate that a specification is translated from LINQ to SQL by EF Core. To run the tests, we're using docker containers, including a docker-hosted SQL Server instance. You run the tests by simply running `RunTests.bat` or `RunTests.sh`.
52+
We're shipping a built-in repository implementation [RepositoryBase](https://github.com/ardalis/Specification/blob/main/src/Ardalis.Specification.EntityFrameworkCore/RepositoryBaseOfT.cs), ready to be consumed in your apps. You can use it as a reference and create your own custom repository implementation.
8853

8954
## Reference
9055

readme-nuget.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
A .NET library for building query specifications.
1+
A .NET library for building query specifications.
2+
3+
The usage guide and the documentation can be found [here](https://specification.ardalis.com/).
4+
5+
The change log for version 9 and the list of breaking changes can be found [here](https://github.com/ardalis/Specification/issues/427).

0 commit comments

Comments
 (0)