Increase ExpressionBuilder and WhereExpression[Graph] access from internal to public#101
Conversation
|
can u add a test that illustrates the usage. and also add some doco on that use case |
|
Sure. I'll try to get it added tomorrow. I was having a little difficulty
getting my test environment setup with VSCode but should be able to use
`dotnet test`.
…On Thu, Mar 14, 2019, 1:29 AM Simon Cropp ***@***.***> wrote:
can u add a test that illustrates the usage. and also add some doco on
that use case
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#101 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAK1RNl9AYhLUFK5xEyh_CZ7EYNXHJdiks5vWd5KgaJpZM4bzOl8>
.
|
|
Sorry, this might take me a little longer to update. I needed to get the tests running on my Mac, which took me a little. Here's the steps I did (in case others find this useful, or I need to remember later... 😄 )
Update the connection string from ConnectionString = $@"Data Source=.\SQLExpress;Database={dbName}; Integrated Security=True;Max Pool Size=100;MultipleActiveResultSets=true";to ConnectionString = $@"Server=localhost;Database={dbName};User Id=sa;Password=redacted;MultipleActiveResultSets=True";
SqlHelper.EnsureDatabaseExists(ConnectionString);
|
|
@SimonCropp Just curious, I noticed the Test project has I needed to remove it to allow the VSCode test runner extension to work, as even specifying |
|
@SimonCropp Tests and docs added. Regarding the docs, I updated See my comment above regarding |
|
This is now deployed. NuGet may take some time to make it available for download. thanks for all the work. sorry u had hassle getting it running |
|
No worries and thanks. I'll pull it down in a bit once I get to work. Thanks again for the project. It's been working out great. You're likely to get more PRs from me in the future. |
Description
Increasing the default access of
ExpressionBuilderandWhereExpressionwill allow direct usage in non-Query/Navigation Fields which is helpful for aggregate/non-entity returning fields.For example, I expose some
*Summaryfields to provide aggregate rollups of some data, but would like to pass the samewhereargument I pass to the listing fields (ex.AllBalances)For example, this change will allow the following usage:
The solution
I initially tried to use
AddQueryConnectionFieldto add theBalanceSummaryfield and leverage the application of thewhereargument imperatively, but it was raising an exception inIncludeAppenderprobably because theBalanceSummaryclass is not an entity model, but just a DTO/POCO.Exposing these classes gives greater control when needed as well.