subqueries linq
Posted
by user297378
on Stack Overflow
See other posts from Stack Overflow
or by user297378
Published on 2010-06-14T22:18:51Z
Indexed on
2010/06/14
22:22 UTC
Read the original article
Hit count: 286
linq-to-entities
|subqueries
Hey all I am trying to do a subquery in linq but the subquery is a value and it seems to not be working, can anyone help out? I am using the entit frame work I keep getting and int to string error not sure why.
from lrp in remit.log_record_product
join lr in remit.log_record on lrp.log_record_id equals lr.log_record_id
where (lrp.que_submit_date >= RadDatePickerStartDate.SelectedDate) && (lrp.que_submit_date <= RadDatePickerEndDate.SelectedDate)
select new { lrp.que_submit_date,
lr.officer_name,
lr.c_fname,
lr.c_lname,
lrp.price_sold,
lrp.product_cost,
gap_account_number = (from gap in remit.gap_contracts where gap.log_record_product_id == lrp.log_record_product_id select gap.account_number),
iui_account_number = (from iui in remit.iui_contracts where iui.log_record_product_id == lrp.log_record_product_id select iui.account_number),
dp_account_number = (from dp in remit.dp_contracts where dp.log_record_product_id == lrp.log_record_product_id select dp.account_number),
mpd_account_number = (from mpd in remit.mbp_contracts where mpd.log_record_product_id == lrp.log_record_product_id select mpd.product_account_number)
}
© Stack Overflow or respective owner