From 9ca96199d92168fe221dda9aba56f55520a561d8 Mon Sep 17 00:00:00 2001 From: hutongqing <hutongqing@hnkhzn.com> Date: 星期二, 29 十月 2024 17:30:59 +0800 Subject: [PATCH] 1 --- WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs b/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs index dec0451..4782e2a 100644 --- a/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs +++ b/WIDESEAWCS_Server/WIDESEAWCS_Core/Utilities/EntityProperties.cs @@ -86,9 +86,8 @@ } else { - int length = sugarColumn.Length; - if (length == 0) { return (true, null, null); } + if (length == 0) { return (true, null, value); } //鍒ゆ柇鍙屽瓧鑺備笌鍗曞瓧娈� else if (length < 8000 && ((dbType.Substring(0, 1) != "n" @@ -118,15 +117,15 @@ } private static readonly Dictionary<Type, string> ProperWithDbType = new Dictionary<Type, string>() { - { typeof(string),SqlDbTypeName.NVarChar }, - { typeof(DateTime),SqlDbTypeName.DateTime}, - {typeof(long),SqlDbTypeName.BigInt }, - {typeof(int),SqlDbTypeName.Int}, - { typeof(decimal),SqlDbTypeName.Decimal }, - { typeof(float),SqlDbTypeName.Float }, - { typeof(double),SqlDbTypeName.Double }, - { typeof(byte),SqlDbTypeName.Int },//绫诲瀷寰呭畬 - { typeof(Guid),SqlDbTypeName.UniqueIdentifier} + { typeof(string), SqlDbTypeName.NVarChar }, + { typeof(DateTime), SqlDbTypeName.DateTime}, + { typeof(long), SqlDbTypeName.BigInt }, + { typeof(int), SqlDbTypeName.Int}, + { typeof(decimal), SqlDbTypeName.Decimal }, + { typeof(float), SqlDbTypeName.Float }, + { typeof(double), SqlDbTypeName.Double }, + { typeof(byte), SqlDbTypeName.Int },//绫诲瀷寰呭畬 + { typeof(Guid), SqlDbTypeName.UniqueIdentifier} }; public static string GetProperWithDbType(this PropertyInfo propertyInfo) -- Gitblit v1.9.3