Creating a linq query which results in only 1 query execution -


i have following 2 tables: *tablea *tableb

tablea has 1 many relationship tableb , therefore tableb has column foreign key tablea

tablea used create c# class called classa has bool property indicating wether has related records in tableb called hasrecords

i create this:

tablea.select(s => new classa {       hasrecords = s.tableb.any() } 

will create 1 query or multiple ones because of function? there way in line without triggering multiple query executions or have resort table valued function?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -