See https://github.com/StefH/System.Linq.Dynamic.Core/wiki/Dynamic-Expressions#conversions
Or I misused this in an not proper way?
Hit this issue with debug an query issue with efcore when eval at local, and it's able to write an reproduct case without efcore. Tested with 1.0.8.11
public class ConsumptionWithDateLite
{
public DayOfWeek? DayOfWeek { get; set; }
}
var a1 = Enumerable.Repeat(0, 100)
.Select((d, i) => new DateTime(2000, 1, 1).AddDays(i))
.AsQueryable()
//.Select("new (DayOfWeek)")
.Select<ConsumptionWithDateLite>("new (DayOfWeek)");
var z1 = a1.ToList();
System.Diagnostics.Debug.Assert(!z1.Any(zx => zx.DayOfWeek == null));
Update: This get null on netcoreapp, and an System.Security.VerificationException:“操作可能会破坏运行时稳定性。”(Operation may break runtime stability) on netfx
See https://github.com/StefH/System.Linq.Dynamic.Core/wiki/Dynamic-Expressions#conversions
Or I misused this in an not proper way?
Hit this issue with debug an query issue with efcore when eval at local, and it's able to write an reproduct case without efcore. Tested with
1.0.8.11Update: This get null on netcoreapp, and an
System.Security.VerificationException:“操作可能会破坏运行时稳定性。”(Operation may break runtime stability) on netfx