CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 16 Jul 2025 13:41:52 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090720061509
location: https://web.archive.org/web/20090720061509/https://forums.oreilly.com/user/18722/manu71/
server-timing: captures_list;dur=0.676198, exclusion.robots;dur=0.027739, exclusion.robots.policy;dur=0.012135, esindex;dur=0.015829, cdx.remote;dur=22.915058, LoadShardBlock;dur=565.371765, PetaboxLoader3.datanode;dur=142.917819, PetaboxLoader3.resolve;dur=217.925200
x-app-server: wwwb-app217
x-ts: 302
x-tr: 622
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app217; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Wed, 16 Jul 2025 13:41:53 GMT
content-type: text/html;charset=utf-8
x-archive-orig-date: Mon, 20 Jul 2009 06:15:12 GMT
x-archive-orig-server: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PHP/5.2.8
x-archive-orig-x-powered-by: PHP/5.2.8
x-archive-orig-cache-control: no-cache, must-revalidate, max-age=0
x-archive-orig-expires: 0
x-archive-orig-pragma: no-cache
x-archive-orig-connection: close
x-archive-orig-transfer-encoding: chunked
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Mon, 20 Jul 2009 06:15:09 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Mon, 20 Jul 2009 06:15:09 GMT", ; rel="memento"; datetime="Mon, 20 Jul 2009 06:15:09 GMT", ; rel="next memento"; datetime="Fri, 12 Feb 2010 11:30:37 GMT", ; rel="last memento"; datetime="Fri, 12 Feb 2010 11:30:37 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_10_20090720044356_crawl101.gpg-c/52_10_20090720061445_crawl100.arc.gz
server-timing: captures_list;dur=0.743648, exclusion.robots;dur=0.025624, exclusion.robots.policy;dur=0.011813, esindex;dur=0.017812, cdx.remote;dur=22.713985, LoadShardBlock;dur=162.649404, PetaboxLoader3.datanode;dur=167.103114, load_resource;dur=134.995408, PetaboxLoader3.resolve;dur=71.113525
x-app-server: wwwb-app217
x-ts: 200
x-tr: 440
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
manu71 - Viewing Profile
O'Reilly Forums > Viewing Profile

Profile
Personal Photo
Rating
Options
Options
Personal Statement
manu71 doesn't have a personal statement currently.
Personal Info
manu71
Active Member
Age Unknown years old
![]()
Location Unknown
Birthday Unknown
Interests
No Information
Statistics
Joined: 19-June 09
Profile Views: 70*
Last Seen: 16th July 2009 - 06:41 AM
11 posts (0 per day)
Contact Information
![]() ![]() ![]() ![]() * Profile views updated each hour
![]() |
Topics
Posts
Gallery
Comments
Friends
My Content
16 Jul 2009
Hello,
I have 2 tables, Customer and Reservations. A Customer can have many reservations. I want to return a certain Customer based on his/her first, lastname and only return his/her reservations starting from within a certain date. So i constructed next Linq to Entities query: var q = from c in context.Contacts.OfType<Customer>().Include("Reservations") where c.FirstName == p_firstName && c.LastName == p_lastName && c.Reservations.Any(r => r.ReservationDate >= p_reservationDate) select c; But this is not what i want, this query returns "all" reservations of the parametrized customer if any of the reservation dates is within the bounds of the given date (p_reservationDate). What i want to do is only "eager" load those reservations made later or equal to the p_reservationDate. In my opinion, it should be possible to add this clause in the "Include" method, like this: <first_part_of_query>.Include("Reservations",c.Reservations.Any(r => r.ReservationDate >= p_reservationDate)).<final_party_of_query> ... but this does not work ... so my question, how do we add conditions on the included child objects (in this case "Reservations"). Thx for any Response, Emmanuel Nuyttens.
10 Jul 2009
Hi Julie,
As chapter 14 lacks the WPF implementation, i've took the time to build the example on WPF, adding some features like DataTemplate for Reservations and combobox and a currency converter. Implementation can be found in attached PDF. greetz, Emmanuel Nuyttens.
Attached File(s)
30 Jun 2009
Hi Julie,
I have a little question concerning the edmx file and the designer. Most tutorials or books are using sample databases (like BreakAway, the one included in your book). Those db's only contain few tables (20 or less ...). But what about "Big" production-related databases (like we have, they contain > 500 tabels), thus with many, many associations. So, normally you have to work with a single edmx file (due to assosication retrievel & transactional correctnes), that's the most easy way, but putting +500 tabels in the designer, i don't think this will rock (IMG:https://forums.oreilly.com/style_emoticons/default/rolleyes.gif) , do you ? I thought of 2 possible solutions, namely creating more then 1 context (thus more then one edmx file), but then you have to "group" tables with their dependencies (associations) together in a sole edmx file. By example, if i have an ordersystem with customer, supplier & orders, so ... i can make and edmx for customer & supplier related tables, and another one for the specific order tables. ... but what if i have next association: Customer(0,1) -> CustomerType Customer(0,*) -> Orders Order(0,*) -> OrderDetails So presume we've put "Customer" and "CustomerType" in one edmx, "Order" and "OrderDetails" in another. Problem is that Customer will only be aware of CustomerType, And Order of OrderDetails --> the association between Customer & Order is not known, as those tables "live" in a separate model. Another solution i thought about was taking favour of the"Partial Class" implementation, so create model1.edmx with Customer & CustomerType and model2.edmx with "Order" and "OrderDetails", then in the code set both models to same partial class name, remove some redundant connection code in model2. This visually worked, i had 2 models pointing to the same partial class and different designer, but it didn't work out to add association between tables in the different models (IMG:https://forums.oreilly.com/style_emoticons/default/unsure.gif) So, did someone @ MS think about this, or am i the sole one which is worried about this topic ? thanx for any response, Emmanuel Nuyttens
26 Jun 2009
Hi Julie,
Back again .... (IMG:https://forums.oreilly.com/style_emoticons/default/rolleyes.gif) I saw some earlier post about "TPT mapping problems", i'm following your implementation for 12.2.1. Mapping TPT Inheritance, but ... after securly following your step by step explanation, i'm a bit into trouble, in other words ... get quit a few "compile errors", (others then the ones explained in the former post about TBT --> cfr. post by guy called BBrandon or so ...). The error stack is quit long, i attached all errors in a PDF file. For each bunch of errors i display the XML on which the error points to ... Hope you can help me. I like reading your book alot, but ... at this very moment i'm a bit disappointed that such a "minor" modification to the model (TPT inheritance between Customer & Contact) has such a bad impact to the model ... Hope you can help me ! Greetz, Emmanuel. PS : For errors : see attached file (IMG:https://forums.oreilly.com/style_emoticons/default/wink.gif)
Attached File(s)
25 Jun 2009
Hi Julie,
Book mentioned : public partial class Customer { public Customer() { this.Addresses.AssociationChanged += new CollectionChangeEventHandler(Addresses_AssociationChanged); } Private void Addresses_AssociationChanged (object sender, CollectionChangeEventArgs e) { CollectionChangeAction act = e.Action; Address addOnOtherEnd = (Address)e.Element; //add your logic here } } But assoc. to Address is in Contact, so former code should be : public partial class Customer { public Customer() { this.Contact.Addresses.AssociationChanged += new System.ComponentModel.CollectionChangeEventHandler(Addresses_AssociationChanged) ; } void Addresses_AssociationChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e) { ... } } Greetz, Emmanuel. |
Last Visitors
manu71 has no visitors to display.
Comments
Other users have left no comments for manu71.
Friends
There are no friends to display.
![]() |
![]() |
Lo-Fi Version | Time is now: 19th July 2009 - 10:15 PM |