My problem is actually double. First off, I'm pretty new to EF, but I have used it with some success, using shortcuts before. Although, for this particular project, I plan to spend time studying.
What I have at the moment is a very simplified database structure:
Post =================== Id Title ------------------- 1 Hello world 2 Foo bar baz Tag =================== Id Title ------------------- 6 test 7 todo PostTags =================== PostId TagId ------------------- 1 6 1 7 2 7
Using EF, he creates a model with two objects: Publish and Tag .
What I'm trying to accomplish:
I am trying to query the model for all messages defined by the tagIds array (e.g. 6 and 7). However, I cannot understand what I need to do to make this work. I used to cheat on the fact that I added auto-increment PK to the mapping table (BlogPosts) and added it to the EF model, but it was rather an ugly hack to move forward. I'd rather learn to do it now.
source share