Entity Framework - Join on many to many -
I have very simple for many relationships and I am thinking how you can remove it
< H2> TablesMedia Media_keyword (many maps of multiple maps)
I have a code here:
public list & lt; Keyword & gt; GetFromMedia (int mediaID) {var media = (in connection media with data. Media where m.id == select mediaID). first (); Var key = (Media by K. Media_keyword select new keyword {ID = k.Keywords.id, Name = k.Keywords.keyword}}; Return keys Toolist (); }
Is this a way to do better?
Normally, I select the right from multiple maps.
var keys = K. data from connection. Media_keyword where k.MediaID == select mediaID k.Keywords;
Comments
Post a Comment