Can I use index?
I want to output an index in results like this:
Domains .Include(x => x.ApiData).OrderByDescending(x => x.ApiData.TF) .Take(5000) .Select((x, index) => new { index, x.DomainName, x.ApiData.TF, x.ApiData.CF, x.ApiData.DA, x.ApiData.PA, x.ApiData.RefDomains, x.ApiData.EBL })I get error
Is there a way to make it work?
NotSupportedException: LINQ to Entities does not recognize the method 'System.Linq.IQueryable`1[<>f__AnonymousType0`8[System.Int32,System.String,System.Int32,System.Int32,System.Decimal,System.Decimal,System.Int32,System.Int32]] Select[Domain,<>f__AnonymousType0`8](System.Linq.IQueryable`1[WaybackScrape.Models.Domain], System.Linq.Expressions.Expression`1[System.Func`3[WaybackScrape.Models.Domain,System.Int32,<>f__AnonymousType0`8[System.Int32,System.String,System.Int32,System.Int32,System.Decimal,System.Decimal,System.Int32,System.Int32]]])' method, and this method cannot be translated into a store expression.
Comments