File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ public string GetViewDefinition(string viewName)
7575 if ( Connection == null )
7676 throw new InvalidOperationException ( "No database connection available." ) ;
7777
78- view = Connection . Query < string > ( $ "SELECT OBJECT_DEFINITION(object_id(' { viewName } ' ))") . First ( ) ;
78+ view = Connection . Query < string > ( "SELECT OBJECT_DEFINITION(object_id(@ viewName))" , new { viewName } ) . First ( ) ;
7979
8080 var originalStart = view . IndexOf ( DatabaseView . BeginOriginal , StringComparison . Ordinal ) ;
8181 if ( originalStart > 0 )
@@ -108,7 +108,7 @@ public string GetViewDefinition(string viewName)
108108 if ( Connection == null )
109109 return null ;
110110
111- return Connection . Query < string > ( $ "SELECT OBJECT_DEFINITION(object_id(' { viewName } ' ))") . FirstOrDefault ( ) ;
111+ return Connection . Query < string > ( "SELECT OBJECT_DEFINITION(object_id(@ viewName))" , new { viewName } ) . FirstOrDefault ( ) ;
112112 }
113113
114114 /// <summary>
You can’t perform that action at this time.
0 commit comments