Browse Source
Merge pull request #21091 from HamzaSallakh/dev
change the is satisfied and to expression examples
pull/21132/head^2
Halil İbrahim Kalkan
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
3 additions and
3 deletions
-
docs/en/framework/architecture/domain-driven-design/specifications.md
|
|
@ -81,7 +81,7 @@ namespace MyProject |
|
|
{ |
|
|
{ |
|
|
public class CustomerService : ITransientDependency |
|
|
public class CustomerService : ITransientDependency |
|
|
{ |
|
|
{ |
|
|
public async Task BuyAlcohol(Customer customer) |
|
|
public async Task BookRoom(Customer customer) |
|
|
{ |
|
|
{ |
|
|
if (!new Age18PlusCustomerSpecification().IsSatisfiedBy(customer)) |
|
|
if (!new Age18PlusCustomerSpecification().IsSatisfiedBy(customer)) |
|
|
{ |
|
|
{ |
|
|
@ -120,7 +120,7 @@ namespace MyProject |
|
|
_customerRepository = customerRepository; |
|
|
_customerRepository = customerRepository; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public async Task<List<Customer>> GetCustomersCanBuyAlcohol() |
|
|
public async Task<List<Customer>> GetCustomersCanBookRoom() |
|
|
{ |
|
|
{ |
|
|
var queryable = await _customerRepository.GetQueryableAsync(); |
|
|
var queryable = await _customerRepository.GetQueryableAsync(); |
|
|
var query = queryable.Where( |
|
|
var query = queryable.Where( |
|
|
|