c# - Silverlight + WCF RIA + how to include a conditional set of child records (not all but a set) -
I have a problem loading the related data through WCF RIA and entity framework - please help me - I do not know that
How to solve it
I have room and lieutenant- Roomrections (Includes references to the Startdate / Endads field and parent room) and I have to load the roomreferences where where start date> = 1.07 .2010 and end date & lt; = 15.07.2010. Parental room should also be included. I am using the [Include] feature on Property Property Plus to retrieve the related property.
The problem is that on the client side, I get a room related to room records (for example, where the start / end date is from last one year - I do not need it - many records will be!) But I should get room with roomrections, what is the procedure to solve this situation with the start / end date which has been mentioned? Thanks!
up!
Looks like I was wrong - everything works fine and conditional loading is working properly ... sorry!
query:
var res = From this in the room. Object contact Rooms from the RR in the room. Where the record is (where RR startdate> = startDate.Date & amp; RR.Startdate & lt; endDate) || (RR & amp; Date & gt; Start Date.DATE & amp; RR.andDate & Lt; End Date) || (R.R.StartDet & Lt; start date date. & Amp; amp; RR.and & gt; = End date) Select new {room = RR. Room, RRCC = RR}; Var ret = res.Asumerable (). Select (d = & gt; d.rooom); Var justRoomRecords = ret.SelectMany (r => R. Roomrecords) .Oolist (); // Just to check return returns;
Comments
Post a Comment