This commit is contained in:
grzegorz.russek
2016-10-19 08:36:38 +00:00
parent d8b6c8f488
commit 22e4534296
5 changed files with 15 additions and 12 deletions

View File

@@ -43,7 +43,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DynamORM.Amalgamation.cs" />
<Compile Include="DynamORM.Amalgamation.cs">
<ExcludeFromStyleCop>True</ExcludeFromStyleCop>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>

View File

@@ -2749,7 +2749,7 @@ namespace DynamORM
/// <summary>Reads the type of column from the schema.</summary>
/// <param name="schema">The schema.</param>
/// <returns>GEneric parameter type.</returns>
/// <returns>Generic parameter type.</returns>
protected virtual DbType ReadSchemaType(dynamic schema)
{
Type type = (Type)schema.DATATYPE;
@@ -2757,7 +2757,7 @@ namespace DynamORM
// Small hack for SQL Server Provider
if (type == typeof(string) && Provider != null && Provider.GetType() == typeof(System.Data.SqlClient.SqlClientFactory))
{
var map = (schema as IDictionary<string, object>);
var map = schema as IDictionary<string, object>;
string typeName = (map.TryGetValue("DATATYPENAME") ?? string.Empty).ToString();
switch (typeName)
@@ -7874,7 +7874,7 @@ namespace DynamORM
return string.Format("({0})", str);
// TODO: Make special condiion
//throw new InvalidOperationException(string.Format("The parameters in this command '{0}' cannot be added to a null collection.", node.Parameters));
////throw new InvalidOperationException(string.Format("The parameters in this command '{0}' cannot be added to a null collection.", node.Parameters));
// Copy parameters to new comand
foreach (KeyValuePair<string, IParameter> parameter in node.Parameters)