diff --git a/ChangeLog/7.1.1-dev.txt b/ChangeLog/7.1.1-dev.txt index 257ca8a803..1c783fc13e 100644 --- a/ChangeLog/7.1.1-dev.txt +++ b/ChangeLog/7.1.1-dev.txt @@ -1 +1,2 @@ -[main] Improved memory efficency of cached queries. \ No newline at end of file +[main] Improved memory efficency of cached queries. +[main] One of PersistRequest's constructors marked obsolete since it is no loger in use \ No newline at end of file diff --git a/Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequest.cs b/Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequest.cs index e7b706c33c..ca0bcb6557 100644 --- a/Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequest.cs +++ b/Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequest.cs @@ -28,8 +28,6 @@ public sealed class PersistRequest public IEnumerable ParameterBindings { get; private set; } - internal NodeConfiguration NodeConfiguration { get; private set; } - public SqlCompilationResult GetCompiledStatement() { if (compiledStatement==null) @@ -50,10 +48,21 @@ public void Prepare() public PersistRequest( StorageDriver driver, SqlStatement statement, IEnumerable parameterBindings) - : this(driver, statement, parameterBindings, null) { + ArgumentValidator.EnsureArgumentNotNull(driver, "driver"); + ArgumentValidator.EnsureArgumentNotNull(statement, "statement"); + + var compileUnit = statement as ISqlCompileUnit; + if (compileUnit == null) + throw new ArgumentException("Statement is not ISqlCompileUnit"); + + this.driver = driver; + Statement = statement; + CompileUnit = compileUnit; + ParameterBindings = ParameterBinding.NormalizeBindings(parameterBindings); } + [Obsolete] public PersistRequest( StorageDriver driver, SqlStatement statement, IEnumerable parameterBindings, NodeConfiguration nodeConfiguration) { @@ -68,7 +77,6 @@ public PersistRequest( Statement = statement; CompileUnit = compileUnit; ParameterBindings = ParameterBinding.NormalizeBindings(parameterBindings); - NodeConfiguration = nodeConfiguration; } } } \ No newline at end of file