Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IQueryable<Enquiry> linq = db.Enquiries;
- if(...) linq = linq.Where(...);
- if(...) linq = linq.Where(e =>
- (x <= (from p in db.Orders where p.EnquiryId == e.Id select p).Count() &&
- (from p in db.Orders where p.EnquiryId == e.Id select p).Count() <= y));
- if(...) linq = linq.Where(...);
- var result = (from e in linq select e);
- x => { int y = x + 1; return x + y; }
- delegate(int x) {
- int y = x + 1;
- return x + y;
- }
- ... = linq.Where(e => {
- var count = (from p in db.Orders where p.EnquiryId == e.Id select p).Count();
- return x <= count && count <= y;
- });
- ... = from e in linq
- let count = (from p in db.Orders where p.EnquiryId == e.Id select p).Count()
- where (x <= count) && (count <= y)
- select e;
- where (x <= count) && /* <= */ (count <= y);
- public static Boolean Between(this int value, int from, int to)
- {
- return from <= value && value <= to;
- }
- (count => x <= count && count <= y)
- ((from p in db.Orders
- where p.EnquiryId == e.Id
- select p).Count())
Add Comment
Please, Sign In to add comment