Browse Source

Optimization error

SqlSugar5
sunkaixuan 2 years ago
parent
commit
47637e9cc2
  1. 2
      Src/Asp.Net/SqlSugar/Realization/Sqlite/DbBind/SqliteDbBind.cs
  2. 2
      Src/Asp.NetCore2/SqlSugar/Realization/Sqlite/DbBind/SqliteDbBind.cs

2
Src/Asp.Net/SqlSugar/Realization/Sqlite/DbBind/SqliteDbBind.cs

@ -23,7 +23,7 @@ namespace SqlSugar
if (csharpTypeName == "DateTimeOffset")
csharpTypeName = "DateTime";
var mappings = this.MappingTypes.Where(it => it.Value.ToString().Equals(csharpTypeName, StringComparison.CurrentCultureIgnoreCase));
return mappings.HasValue() ? mappings.First().Key : "varchar";
return mappings.Any() ? mappings.First().Key : "varchar";
}
public override List<KeyValuePair<string, CSharpDataType>> MappingTypes
{

2
Src/Asp.NetCore2/SqlSugar/Realization/Sqlite/DbBind/SqliteDbBind.cs

@ -23,7 +23,7 @@ namespace SqlSugar
if (csharpTypeName == "DateTimeOffset")
csharpTypeName = "DateTime";
var mappings = this.MappingTypes.Where(it => it.Value.ToString().Equals(csharpTypeName, StringComparison.CurrentCultureIgnoreCase));
return mappings.HasValue() ? mappings.First().Key : "varchar";
return mappings.Any() ? mappings.First().Key : "varchar";
}
public override List<KeyValuePair<string, CSharpDataType>> MappingTypes
{

Loading…
Cancel
Save