-
Notifications
You must be signed in to change notification settings - Fork 63
add [AutoResolve] for reading from app setting #208
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a sample and test for this
samples/InputBindingSamples/GetProductsStoreProcedureFromAppSetting.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more cleanup things, but overall looks good!
namespace Microsoft.Azure.WebJobs.Extensions.Sql.Samples.InputBindingSamples | ||
{ | ||
/// <summary> | ||
/// This shows an example of a SQL Input binding that uses a store procedure from app setting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shows an example of a SQL Input binding that uses a stored procedure from an app setting value to query for Products with a specific cost that is also defined as an app setting value.
this.StartFunctionHost(nameof(GetProductsStoredProcedureFromAppSetting)); | ||
|
||
// Generate T-SQL to insert n rows of data with cost | ||
Product[] products = GetProductsWithSameCost(1, 100); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should also insert some products with cost != 100 to make sure we're only grabbing the expected products
* add [AutoResolve] for reading from app setting * add sample * add test * update test * fix test
* add [AutoResolve] for reading from app setting * add sample * add test * update test * fix test
Adding [AutoResolve] tag enables reading the %% values from app config during run time. This was already added to parameters but missed from CommandText. Adding it to enable reading stored procedure values from app config.
This fixes #200.