diff --git a/src/Microsoft.SqlTools.ServiceLayer/DacFx/Contracts/ParseTSqlScriptRequest.cs b/src/Microsoft.SqlTools.ServiceLayer/DacFx/Contracts/ParseTSqlScriptRequest.cs
index 246bb0d2..51802989 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/DacFx/Contracts/ParseTSqlScriptRequest.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/DacFx/Contracts/ParseTSqlScriptRequest.cs
@@ -3,7 +3,6 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
-using Microsoft.SqlTools.ServiceLayer.Utility;
namespace Microsoft.SqlTools.ServiceLayer.DacFx.Contracts
{
@@ -13,9 +12,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx.Contracts
public class ParseTSqlScriptRequestParams
{
///
- /// Gets or sets the script content
+ /// Gets or sets the script file path.
///
- public string Script { get; set; }
+ public string FilePath { get; set; }
///
/// Gets or sets the DSP.
@@ -26,7 +25,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx.Contracts
///
/// Result for the ParseTSqlScript Request.
///
- public class ParseTSqlScriptResult : ResultStatus
+ public class ParseTSqlScriptResult
{
public bool ContainsCreateTableStatement { get; set; }
}
diff --git a/src/Microsoft.SqlTools.ServiceLayer/DacFx/DacFxService.cs b/src/Microsoft.SqlTools.ServiceLayer/DacFx/DacFxService.cs
index 13deda58..32784990 100644
--- a/src/Microsoft.SqlTools.ServiceLayer/DacFx/DacFxService.cs
+++ b/src/Microsoft.SqlTools.ServiceLayer/DacFx/DacFxService.cs
@@ -311,9 +311,10 @@ namespace Microsoft.SqlTools.ServiceLayer.DacFx
{
try
{
+ var script = System.IO.File.ReadAllText(requestParams.FilePath);
await requestContext.SendResult(new ParseTSqlScriptResult()
{
- ContainsCreateTableStatement = DacTableDesigner.ScriptContainsCreateTableStatements(requestParams.Script, requestParams.DatabaseSchemaProvider)
+ ContainsCreateTableStatement = DacTableDesigner.ScriptContainsCreateTableStatements(script, requestParams.DatabaseSchemaProvider)
});
}
catch (Exception e)