From afd9ff37f49cba705ac181cf91b8d6286dabbda1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 4 Nov 2020 17:55:48 +0300 Subject: [PATCH 1/2] Update Specifications.md --- docs/en/Specifications.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/Specifications.md b/docs/en/Specifications.md index 80c10328ae..557c70e29f 100644 --- a/docs/en/Specifications.md +++ b/docs/en/Specifications.md @@ -12,7 +12,7 @@ abp add-package Volo.Abp.Specifications ## Defining the Specifications -Assume that you've an Customer entity as defined below: +Assume that you've a Customer entity as defined below: ````csharp using System; From fbb62969d97b176f31b339cf8408f3138247c588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 4 Nov 2020 17:59:04 +0300 Subject: [PATCH 2/2] Update Specifications.md --- docs/en/Specifications.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/Specifications.md b/docs/en/Specifications.md index 557c70e29f..62e324e5f9 100644 --- a/docs/en/Specifications.md +++ b/docs/en/Specifications.md @@ -228,9 +228,9 @@ public async Task GetAdultPremiumCustomerCountAsync() While the specification pattern is older than C# lambda expressions, it's generally compared to expressions. Some developers may think it's not needed anymore and we can directly pass expressions to a repository or to a domain service as shown below: -``` +````csharp var count = await _customerRepository.CountAsync(c => c.Balance > 100000 && c.Age => 18); -``` +```` Since ABP's [Repository](Repositories.md) supports Expressions, this is a completely valid use. You don't have to define or use any specification in your application and you can go with expressions.