开发者

Is there a reference for EF4 Fluent API syntax?

I keep searching the web for examples of the new fluent API syntax in开发者_高级运维 Microsoft's Entity Framework technology previews ... I come up with bits and pieces here and there.

Is there any reliable place to go to find ALL the possibilities? And maybe something that explains them a bit ("HasRequired", "WithMany", etc.)?

FYI, I am specifically trying to figure out how to define a foreign key/primary key relationship explicitly through fluent API.


No, unfortunately, not at this time. The current syntax is a preview and subject to change. There is no official documentation yet. There is nothing in MSDN. The best one-stop example I found is here. See also this post and the items linked there.

Folks on the leading edge can expect turbulence. :)

Update: The API documentation was just released.


I know this question has more than one year old, but for those who arrive here: MSDN now has an entry on Code First Fluent API with introductory examples and common tasks.


The best reference at the moment are blog posts (=> google). You can start with ADO.NET Team blog where are announced new features with examples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜