File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
eFormAPI/eFormAPI.Web/Hosting/Helpers Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,14 @@ public static List<IEformPlugin> GetPlugins(IConfiguration configuration)
48
48
{
49
49
var connectionString = dbContext . Database . GetDbConnection ( ) . ConnectionString ;
50
50
51
- var connectionStringMatch = Regex . Match ( connectionString , @"Database=(.*)_(.*); " ) ; //.Groups[1].Value;
52
- if ( connectionStringMatch . Groups . Count != 3 )
53
- {
54
- throw new Exception ( "Error while parsing connection-string database name" ) ;
55
- }
51
+ // var connectionStringMatch = Regex.Match(connectionString, @"( Database=\w*;) ");//.Groups[1].Value;
52
+ // if (connectionStringMatch.Groups.Count != 3)
53
+ // {
54
+ // throw new Exception("Error while parsing connection-string database name");
55
+ // }
56
56
57
- var dbNameSection = connectionStringMatch . Groups [ 0 ] . Value ;
58
- var dbPrefix = connectionStringMatch . Groups [ 1 ] . Value ;
57
+ var dbNameSection = Regex . Match ( connectionString , @"(Database=\w*;)" ) . Groups [ 0 ] . Value ;
58
+ var dbPrefix = Regex . Match ( connectionString , @"Database=(.*)_" ) . Groups [ 1 ] . Value ;
59
59
60
60
foreach ( var plugin in GetAllPlugins ( ) )
61
61
{
You can’t perform that action at this time.
0 commit comments