Hi, I am getting the below errorr for the following code. I know it's an issue with the syntax but I can't figure out how to fix. I am learning c# and plugin development so any help would be appreciated.
{ CrmServiceContext crmService = new CrmServiceContext(((IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory))).CreateOrganizationService(new Guid?(val2.UserId))); var list = (from x in crmService.SalesOrderDetailSet.Join( crmService.ProductSet, (SalesOrderDetail x) => x.ProductId.Id, (Product x) => x.Id, (SalesOrderDetail x, Product y) => new { x, y }) where x.x.SalesOrderId.Id == salesOrderReference.Id && x.y.ktl_ConsolidateintoServices.Value == true select x).ToList(); SalesOrder salesOrder = crmService.SalesOrderSet.First((SalesOrder x) => x.Id == salesOrderReference.Id);
Error 1: 'System.Linq.IQueryable<entity>' does not contain a definition for 'Join' and no extension method 'Join' accepting a first argument of type 'System.Linq.IQueryable<entity>' could be found (are you missing a using directive or an assembly reference?)
Error 2: 'System.Linq.IQueryable<entity>' does not contain a definition for 'First' and no extension method 'First' accepting a first argument of type 'System.Linq.IQueryable<entity>' could be found (are you missing a using directive or an assembly reference?)
*This post is locked for comments