-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Open
Milestone
Description
Large numbers of lambda expressions can cause issues with stack use. Adding an option to use the string-based API instead would help with this, and potentially also be faster in model building.
Original issue
I am running dotnet version 3.1.301 on Mac OS Catalina. There are a couple hundred indices on one DbSet that was created when scaffolded. I found more than one HasIndex that caused the issue. Here is one:
entity.HasIndex(e => new { e.Partially, e.InvAmount, e.PaidAmt, e.SalesRep, e.Po, e.Estdate, e.UserId, e.DelivMeth, e.ShipCode, e.Reference, e.DocAlias, e.Custchar1, e.Custchar2, e.Custchar3, e.Custchar4, e.Custdate1, e.Custdate2, e.Custdate3, e.Custdate4, e.Custlog1, e.Custlog2, e.Custlog3, e.Custlog4, e.Custnum1, e.Custnum2, e.Custnum3, e.Custnum4, e.Weight, e.Currcode, e.QuoteNo, e.OrderDate, e.Terms, e.IsIncludedInReport, e.HandOff, e.RecurringDocId, e.ShipAmt, e.IsHistorical, e.Custchar5, e.Custchar6, e.Custchar7, e.Custchar8, e.IsPos, e.TrDiscFex, e.InvoicesId, e.BillCode, e.CustCode, e.StageId, e.Status, e.Shipped, e.IsManual, e.DocNo, e.DocNoSort })
.HasName("_dta_index_INVOICES_7_542624976__K1_K33_K8_K89_K2_K13_K82_K3_K161_5_7_11_14_19_20_26_28_29_30_31_34_40_51_52_53_54_55_56_57_58_");
The issue does not show itself when running the same call in Windows 10 or Docker's dotnet/core/aspnet:3.1-alpine.
Removing all HasIndex's is a workaround for now.
Reactions are currently unavailable