Vraag : System.InvalidCastException was unhandled door de code van de Fout van de gebruikerscode inzake LINQ

var vraag = (van orde in context.MyOrderDetails
waar order.UserDomainName == userName
uitgezochte nieuwe
{
order.AccountID,
order.OrderNumber,
order.OrderStatus,
order.StartDate,
order.EndDate,/> orde orde order.BookedRevenue,
order.CreativeCount,
order.MissingCreative,
order.MissingCreative,
order.MissingCount,
order.CreativeCount,
order.NotStartedCount,
order.OrderItemActiveCount,
order.OrderItemCompletedCount,
order.OrderItemCount,
order.BookedImpressions,
order.UACount,
order.UAThroughRate,
order.UACPM,
order.UADeliveredImpressionCount,
order.UADeliveredRevenue,
                                     order.UAImpressionGoal,
order.UACount,
order.MissingCount,
order.MissingCreative31to45Count,
order.MissingCreative46to60Count,
order.MissingCreative61to90Count,
order.OrderLifeToDateClickCount,
order.OrderDeliveredImpressionCount,
order.OrderLifeToDateDiscountedSalesUSD,
order.OrderLifeToDateScheduledImpressionCount,
order.ActiveState,
order.OrderProposalExpirationDate,
order.OrderProposalExtensionCount,
order.UAOrderedImpressionCount,
order.UAPacingLTDDeliveredImpressionCount,
order.UAPacingLTDScheduledImpressionCount,
order.UAPacingPct,
order.PremiumLateCreativeCount,
order.PremiumMissingCreative16to30Count,
order.PremiumAssignedCreativeCount,
order.PremiumMissingCreativeCount,
order.PrimaryAeName,
order.UAScheduledImpressionCount,
order.TotalDayCount,
                                     order.UserDomainName,
order.UADeliveredImpressionPercent,
order.DraftOrderCount,
order.ProposedOrderCount,
order.ApprovedOrderCount,
orde. Filter_OrderGroup,
orde. Filter_LineofBusiness,
orde. Filter_Status,
orde. Filter_ActiveState,
orde. Filter_StartdateNext30,
orde. Filter_StartdateNext60,
orde. Filter_StartdateNext90,
orde. Filter_EndDateNext30,
orde. Filter_EndDateNext60,
orde. Filter_EndDateNext90,
order.LineEvent,
order.IsFavorite,
order.ClientID
}) .ToList ();

It geeft me de bos van errors

System.InvalidCastException was unhandled door gebruiker code
Message=Unable om voorwerp van type „DataServiceOrderedQuery te gieten [<>f__AnonymousType2 `65 [System.String, System. Koord, System.String, System.Nullable `1 [System.DateTime], System. Nullable `1 [System.DateTime], System.String, System. String, System.Decimal, System. Nullable `1 [System.Int32], System. Nullable `1 [System. Int32] , System.Nullable `1 [System. Int32], System.Nullable `1 [System.Int32], System.Nullable `1 [System.Int32], System. Nullable `1 [System.Int32], System. Nullable `1 [System. Int32] , System.Nullable `1 [System. Int32], System.Nullable `1 [System.Int32], System.Decimal, System.Decimal, System.Nullable `1 [System.Decimal], System. Nullable `1 [System. Decimal], System.Nullable `1 [System.Decimal], System. Decimal, System.Decimal, System. Decimal, System.Nullable `1 [System.Int32], System.Nullable `1 [System.Int32], System. Nullable `1 [System.Int32], System. Nullable `1 [System. Int32], System.Decimal, System.Decimal, System.Decimal, System.Decimal, System.String, System.Nullable `1 [System.DateTime], System. Int32, System.Decimal, System. Decimal, System.Decimal, System. Nullable `1 [System.Decimal] , System.Nullable `1[System. Int32], System.Nullable `1 [System.Int32], System.Nullable `1 [System.Int32], System. Nullable `1 [System.Int32], System. String, System.Decimal, System. Int64, System.String, System.Nullable `1 [System.Decimal], System. Nullable `1 [System. Int32] , System.Nullable `1 [System. Int32], System.Nullable `1 [System.Int32], System.String, System. String, System.String, System. String, System.Nullable `1 [System. Byte], System.Nullable `1 [System.Byte], System.Nullable `1 [System.Byte], System.Nullable `1 [System.Byte], System.Nullable `1 [System.Byte], System. Nullable `1 [System.Byte], System. String, System.Int32, System.Nullable `1 [System.Int64]]]“ aan type „System.Data.Services.Client.DataServiceQuery `1 [Microsoft.Advertising.SalesDashboard. Modules. OrderPerformance. Models.OrderPerformance. MyOrderDetails]“.
StackTrace:
bij Microsoft.Advertizing.SalesDashboard.Modules.OrderPerformance. Services. OrderRepository.<>c__DisplayClass85.erDetailsDrillDown>b__83 (de context/>ties van PerformanceEnti bij System.Linq.Observable.<>c__DisplayClass275 `2.<>c__DisplayClass277.

Antwoord : System.InvalidCastException was unhandled door de code van de Fout van de gebruikerscode inzake LINQ

Sommige vragen.
Hoe wordt IMyOrderDetails bepaald? Is het een klasse u cre�ërde?
Selecteert u alle gebieden van de lijst MyOrderDetails in de uitgezochte clausule?
Andere oplossingen  
 
programming4us programming4us