Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose table data/query in entityservice to allow adding referenced table data by chaining Include statements #74

Closed
akema-trebla opened this issue Sep 27, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request high priority High Priority Task
Milestone

Comments

@akema-trebla
Copy link
Contributor

I think it'll be convenient for users to manipulate the query to include desired referenced tables. What do you think?

@iammukeshm iammukeshm self-assigned this Sep 27, 2021
@iammukeshm iammukeshm added enhancement New feature or request high priority High Priority Task labels Sep 27, 2021
@iammukeshm iammukeshm added this to the Release 1.0 milestone Sep 27, 2021
iammukeshm added a commit that referenced this issue Sep 27, 2021
@iammukeshm
Copy link
Member

How about specification pattern?

@iammukeshm
Copy link
Member

iammukeshm commented Sep 27, 2021

something like this...

var spec = new BaseSpecification<Product>();
spec.Includes.Add(a => a.Brand);
var product = await _repository.GetByIdAsync<Product, ProductDetailsDto>(id, spec);
return await Result<ProductDetailsDto>.SuccessAsync(product);

@iammukeshm
Copy link
Member

PS, this is just the initial change.. There is a lot to refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority High Priority Task
Projects
None yet
Development

No branches or pull requests

2 participants