How to define relationships programmatically in Entity Framework 4.1's Code-First Fluent API

I'm playing around with the new EF4.1 unicorn love.

I'm trying to understand the different ways I can use code-first to programatically define my relationships between a few simple POCO's.

How can I define the following =>

  1. 1 Team has 0-many Users. (and a User is in 1 Team)
  2. 1 User has 0-or-1 Foo's (but a Foo has no property going back to a User)
  3. 1 User has 1 UserStuff
15
задан Cœur 15 April 2017 в 19:21
поделиться