mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-06-19 20:38:16 +08:00
Merge pull request #1403 from hyzx86/ExpandoObject
参数化增加 ExpandoObject支持
This commit is contained in:
@ -91,7 +91,7 @@ namespace FreeSql.Internal
|
||||
else colattr.IsIgnore = true;
|
||||
//Navigate 错误提示
|
||||
var pnvAttr = common.GetEntityNavigateAttribute(trytb.Type, p);
|
||||
if (pnvAttr != null) throw new Exception(CoreStrings.Navigation_Missing_SetProperty(trytb.Type.DisplayCsharp(),p.Name));
|
||||
if (pnvAttr != null) throw new Exception(CoreStrings.Navigation_Missing_SetProperty(trytb.Type.DisplayCsharp(), p.Name));
|
||||
}
|
||||
if (tp == null && colattr?.IsIgnore != true)
|
||||
{
|
||||
@ -396,7 +396,7 @@ namespace FreeSql.Internal
|
||||
trytb.VersionColumn = trytb.Columns.Values.Where(a => a.Attribute.IsVersion == true).LastOrDefault();
|
||||
if (trytb.VersionColumn != null)
|
||||
{
|
||||
if (trytb.VersionColumn.Attribute.MapType.IsNullableType() ||
|
||||
if (trytb.VersionColumn.Attribute.MapType.IsNullableType() ||
|
||||
trytb.VersionColumn.Attribute.MapType.IsNumberType() == false && !new[] { typeof(byte[]), typeof(string) }.Contains(trytb.VersionColumn.Attribute.MapType))
|
||||
throw new Exception(CoreStrings.Properties_AsRowLock_Must_Numeric_Byte(trytb.VersionColumn.CsName));
|
||||
}
|
||||
@ -1063,7 +1063,7 @@ namespace FreeSql.Internal
|
||||
trytb.AddOrUpdateTableRef(pnv.Name, nvref);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (nvref.Exception == null && trytb.Primarys.Length == 1 && isArrayToMany == false)
|
||||
{
|
||||
if (pnvBind?.Length == 1)
|
||||
@ -1433,7 +1433,7 @@ namespace FreeSql.Internal
|
||||
var type = obj.GetType();
|
||||
if (ttype.IsAssignableFrom(type)) return new[] { (T)obj };
|
||||
var ret = new List<T>();
|
||||
var dic = obj as IDictionary;
|
||||
var dic = obj as IDictionary<string, object>;
|
||||
if (dic != null)
|
||||
{
|
||||
foreach (var key in dic.Keys)
|
||||
|
Reference in New Issue
Block a user