Closed stijnherreman closed 6 years ago
Trying to understand the ask here. Setting it in code after wouldn't work because it's denormalized for efficiency (we don't create the query strings every time...just once and memoize). So we need to do it on creation.
Do you want the table name to be something you can specify from the JSON (or whatever your config source is)? Or am I misunderstanding the request?
Yeah, I'd like to specify the table name and the schema name via configuration.
@stijnherreman git auto-closed this, but packages should be up on MyGet shortly adding TableName
to the store settings. Example JSON confiig:
{
"Exceptional": {
"Store": {
"ApplicationName": "Samples (ASP.NET Core SQL)",
"Type": "SQL",
"ConnectionString": "Server=.;Database=Local.Exceptions;Trusted_Connection=True;",
"TableName": "MyExceptions"
}
}
}
Thanks, verified that it's working.
When using
ErrorStoreSettings
viaservices.AddExceptional(...)
orExceptional.Configure(...)
, the SQL store is created with"Exceptions"
as table name.Can you expose store-specific settings through the configuration? If not, can you expose
private readonly string _tableName;
to be set in code afterwards?I can create a PR if you give some guidelines for how you'd like to see it built.