0

First of all I'm very noob in asp.net and I'm trying to find how can I perform a triple join. If I did this right than how can I pass this to product service?

public IList<Product> joinx()
{
    var sonuc = Context.Photos.Join(Context.ProductProperties,
            ulist => ulist.PhotoID,
            ozlist => ozlist.ProductID,
            (ulist, ozlist) => new {ulist, ozlist })
        .Join(Context.PropertyTypes,
            ilkjoin =>ilkjoin.ozlist.PropertyTypeID,
            ikinci => ikinci.PropertyTypeID,
            (ilkjoin,ikinci) => new {ilkjoin,ikinci })
        .ToList();

   return sonuc;
}

coding 10 hours straight so my head is messed up please help

brichins
  • 3,825
  • 2
  • 39
  • 60
  • Is it a reason why you haven't added navigation properties in your entities? it would be easier to query – sroll Aug 11 '15 at 18:23
  • This is actually a LINQ question, nothing to do with ASP.NET. Refer to the [MSDN join clause article](https://msdn.microsoft.com/en-us/library/bb311040.aspx) and (better for your preferred lambda syntax) [this SO example](http://stackoverflow.com/a/3217679/957950) for more info on LINQ Joins. – brichins Aug 11 '15 at 19:37

0 Answers0