mapping computed properties linq-to-sql actuall sql statements


i have combined additional functionality linq-to-sql classes things easier i arise applications. instance i have tangible ability retrieves active contracts list contracts. however i try ability lambda countenance whole query presumably throws an difference there sql matter relating ability generates query per vigilant (= lot roundtrips server).



the queries themselves overly challenging f.ex:



var activecontracts = customer.contracts.where(w => w.contractenddate == null);


whereas i review as:



var activecontracts = customer.activecontracts;


the sure reason me doing since minimize judicious errors biased i destiny wish change defines an active agreement i don't have redo lot code.



is there proceed mention ability sql should genereate. there proceed certain workable query below?



var singlecontractcustomers = db.customers.where(w => w.activecontracts.count() == 1);


Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members