how to include a column from a second table in my LINQ query

c# entity-framework entity-framework-6 linq-to-sql

Accepted Answer

ZZZ_tmp
2
1/13/2019 6:47:11 AM

Popular Answer

public object GetAd(long currentUser, long adId)
{
    return from a in Context.Favourite
           where a.UserId  == currentUser
           select new {
                      flag = a.AdId != null
                      a.FavouriteId,
                      //etc
                      };
}


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow