Last post Jun 09, 2008 07:19 PM by robconery
Jun 09, 2008 06:27 PM|jwscuba|LINK
OK, so I was really likeing these videos and really likeing the pipes and filters but my problem is that I cant get it to work with a many to many (at least not test).
OK so I have a object categories withc has an id,and a name. I also have a product whitch at this pooint lets just say has an Id, and a name. I having gotten to the database yet(but i know there will be a table to handle a many to many relationship).
I would like to use the filters so i can do repository.getcategories().ofproduct(productid). as well as reposotory.getproducts().bycategory(categoryid). But the Iqueryable returned to filter through doesn't know about the categories, and vise versa. I could
say do a thing were I add a list<product> to my category object and a list<category> to my product object. Then in my repositor when i build the IQueryable i would build the objects completely. But I am not sure I want to do this. For example, If I just
want a list of cetegories for display on a menu Do i really want an list of product on each category. Seems to me like unneeded overhead.
Jun 09, 2008 07:19 PM|robconery|LINK
I was able to use a many/many by outputting the IQueryable of the joining table. I know this isn't ideal, but I can't see a downside yet. You can check out how I did it with Products and Categories in the source.
I haven't created a filter for it yet, but I will refactor that in the coming episodes.