entity framework - F# -> EF generating wrong sql -


I am trying to do a simple-to-one relationship in EF and have defined it: < / P> Type car () = [& lt; DefaultValue & gt;] Vel Temporary Private ID: IT member x.ID get () = x.id and set (V) = x.id ] Val mutable private cars: DBSet and LT; Cars & gt; Member x Get () = x.cars and set (v) = x.cars & lt; - v [& lt; Changeable cars with DefaultValue (true) & gt;] Private dealers: DBSet and LT; Dealer & gt; Members x.Dealers with get () = x.dealers and set (v) = x.dealers & lt; - v

and the console is initially calling it in the following ways:

  let's ctx = new MyContext () query.query < @ Seq {in ctx for x. Do the taxes if x.CarName = "Volvo" then yield x.Dealer.Name} @ & gt;   

The following will generate the following SQL query:

  SELECT [Extent2]. [Name] AS [Name] FROM [dbo]. [Car] [Extent 1] Join the upper part [DBO]. [Dealer] AS [Extent 2] O [Extent 1]. [Dealer_id] = [ext2]. [ID] where N Volvo '[[Extent 1]. [Credit]   

Now my question is, why take the dealer defined in the car type and dealer id instead of dealer id

Specify clear mapping for this property using either.

Comments