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: Enable the TableName invocation in the QueryMultiple operations #1065

Closed
mikependon opened this issue Aug 25, 2022 · 3 comments
Closed
Assignees
Labels
enhancement New feature or request fixed The bug, issue, incident has been fixed.

Comments

@mikependon
Copy link
Owner

mikependon commented Aug 25, 2022

Describe the enhancement

Currently, only the generic type is supported by the QueryMultiple operation. In order for this operation to be more dynamic and powerful when querying the data, the table name invocation must be supported.

using (var connection = new SqlConnection(...))
{
	var orderId = 10045;
	var result = connection.QueryMultiple<Order, OrderItem>("Order", "OrderItem",
		o => o.Id == orderId, oi => oi.OrderId == orderId);
	var order = result.Item1.FirstOrDefault();
	var orderItems = result.Item2.ToList();
}

Where the where params can expect the following types.

  • Anonymous Types
  • IDictionary<string, object>
  • QueryField
  • IEnumerable
  • QueryGroup

Where the anonymous type can expect the following values.

  • .NET native type
  • SqlDbDataParameter
@mikependon mikependon added the enhancement New feature or request label Aug 25, 2022
@mikependon mikependon self-assigned this Aug 25, 2022
@mikependon
Copy link
Owner Author

Referencing the #1070

mikependon added a commit that referenced this issue Sep 1, 2022
#1065 Enabled the TableName invocation within the QueryMultiple opera…
@mikependon mikependon added the fixed The bug, issue, incident has been fixed. label Sep 1, 2022
@mikependon
Copy link
Owner Author

This will be available on the releases > RepoDb v1.12.10.

@mikependon mikependon removed the fixed The bug, issue, incident has been fixed. label Sep 1, 2022
@mikependon
Copy link
Owner Author

The changes must also be implemented within the DbRepository object.

@mikependon mikependon reopened this Sep 1, 2022
@mikependon mikependon pinned this issue Sep 1, 2022
mikependon added a commit that referenced this issue Sep 3, 2022
#1065 Support to the DbRepository.QueryMultiple
@mikependon mikependon added the fixed The bug, issue, incident has been fixed. label Sep 3, 2022
@mikependon mikependon unpinned this issue Sep 3, 2022
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.
Projects
None yet
Development

No branches or pull requests

1 participant