0

I have the following entities:

  public class Bicycle
       {
           public int BicycleId { get; set; }
           public DateTime YearOfManufacture { get; set; }
           public BicycleType BicycleType { get; set; }
       }

   public class BicycleType
       {
            public int BicycleTypeId { get; set; }
            public string Description { get; set; }
        }

Every Bicycle must have just one BicycleType. A BicycleType could be associated with none to many Bicycles. I'm not sure how to create a Fluent Api FK relationship in this situation between Bicycle and BicycleType.

4

1 回答 1

1

从这里开始。这个网站有很多很好的信息。

http://msdn.microsoft.com/en-us/data/jj591620

于 2013-02-17T13:19:11.550 回答