Entity Framework - Join on many to many -


I have very simple for many relationships and I am thinking how you can remove it

< H2> Tables

Media 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

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -