.NET MVC4, Entity, Search
I have an MVC4 project using EF. I have set up my schema so that all searchable items have have a Table that relates them to a "Tags" table. I am wondering what is the most efficient way to do a full search across all table related to this "Tags" table. In addition I will want to do a search across the titles/names of the item in question. Not sure what is the best way to go about this.
I drew a little diagram of this schema:
Thanks for your help!
Pseudo code would look like:
var tagged = db.Products.Where(p => p.ProductTag.Any(pt => pt.Tag.Name.Contains("Search")));
But it would all depend on how your model is setup.