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

Enhancement: Add the 'fields' and 'cacheItemExpiration' as arguments to the QueryMultiple operation #1071

Closed
mikependon opened this issue Aug 30, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request fixed The bug, issue, incident has been fixed. priority Top priority feature or things to do todo Things to be done in the future

Comments

@mikependon
Copy link
Owner

Describe the enhancement

To align the capability of the QueryMultiple operation with the Query operation, the other arguments fields and cacheItemExpiration must be introduced.

using (var connection = new SqlConnection(...))
{
	var orderId = 10045;
	var result = connection.QueryMultiple<Order, OrderItem>(o => o.Id == orderId, oi => oi.OrderId == orderId,
                fields1: Field.From("Id", "Name", "OrderDate"), fields2: Field.From("Id", "OrderId", "ItemId", "Quantity", cacheItemExpiration: Constant.DefaultCacheItemExpirationInMinutes);
	var order = result.Item1.FirstOrDefault();
	var orderItems = result.Item2.ToList();
}
@mikependon mikependon added the enhancement New feature or request label Aug 30, 2022
@mikependon mikependon self-assigned this Aug 30, 2022
@mikependon mikependon pinned this issue Aug 30, 2022
@mikependon mikependon added todo Things to be done in the future priority Top priority feature or things to do labels Aug 30, 2022
mikependon added a commit that referenced this issue Aug 30, 2022
mikependon added a commit that referenced this issue Aug 30, 2022
#1071 Added the 'fields' and 'cacheItemExpiration' args to the QueryM…
@mikependon mikependon unpinned this issue Aug 30, 2022
@mikependon mikependon added the fixed The bug, issue, incident has been fixed. label Aug 30, 2022
@mikependon
Copy link
Owner Author

The fixes to this will be available on the version > RepoDb v1.10.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed The bug, issue, incident has been fixed. priority Top priority feature or things to do todo Things to be done in the future
Projects
None yet
Development

No branches or pull requests

1 participant