You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is broken in version 1.2.20. Version 1.2.19 is working.
1. Description
With this statement:
var result = DataContext.Users
.Where(u => u.Id == id)
.Select($"new {{{"Name,Email"}}}")
.ToDynamicList()
.FirstOrDefault();
The result variable has two properties: Name and Email.
On first access to a property, it works.
On second access to any property it fails with the exception shown.
For example:
var a = result["Name"]; // okay
var b = result["Name"]; // crashes with exception
2. Exception
'result["Name"]' threw an exception of type 'System.ArgumentException'
Data: {System.Collections.ListDictionaryInternal}
HResult: -2147024809
HelpLink: null
InnerException: null
Message: "An item with the same key has already been added."
ParamName: null
Source: "mscorlib"
StackTrace:
" at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Dynamic.Core.DynamicClass.get_Properties() in C:\\Dev\\GitHub\\System.Linq.Dynamic.Core\\src\\System.Linq.Dynamic.Core\\DynamicClass.cs:line 36
at CallSite.Target(Closure , CallSite , Object , String )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)"
TargetSite: {Void ThrowArgumentException(System.ExceptionResource)}
The text was updated successfully, but these errors were encountered:
This is broken in version 1.2.20. Version 1.2.19 is working.
1. Description
With this statement:
The
result
variable has two properties: Name and Email.On first access to a property, it works.
On second access to any property it fails with the exception shown.
For example:
2. Exception
The text was updated successfully, but these errors were encountered: