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

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

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