aspnet / AspNetWebHooks

Libraries to create and consume web hooks on ASP.NET 4.x (Due to other priorities this project is currently in maintenance mode only. There are no planned releases at this time. No new features are planned and we are only addressing critical issues as required.)
Apache License 2.0
134 stars 103 forks source link

Hardcoded Connection String Name #33

Closed i-love-code closed 5 years ago

i-love-code commented 5 years ago

For: Microsoft.AspNet.WebHooks.Custom.SqlStorage

Is there any reason the connection string name cannot be overridden?

We're (regrettably) in a hosting environment which limits the addition of connection strings. We would like to store this information in the same SQL database as our main application data.

In: Microsoft.AspNet.WebHooks.WebHookStoreContext.cs internal const string ConnectionStringName = "MS_SqlStoreConnectionString";

Can this be a configurable setting via app setting or otherwise?

If so, I'd be happy to submit a PR for it. Otherwise, we have to grab all this source and copy into our project :(

i-love-code commented 5 years ago

I GOOFED

public WebHookStoreContext(string nameOrConnectionString) : base(nameOrConnectionString) { NameOrConnectionString = nameOrConnectionString; }