开发者

Entity Framework -- How to set properties to special types

I'm new to MVC and Entity Framework, so this may be a relatively simple answer, but I've tried searching around so far and no luck.

I'm using the most recent versions of both tools to my knowledge (MVC 3 Beta and Entity Framework 4.0)

I'm just trying to set up a quick example. Logically, I'm dealing with events -- in this case, an OngoingServiceEvent and a FiniteServiceEvent, which both inherit from ServiceEvent. I have a Locations Entity, which has LongLatLocation and AddressLocation that inherit from it.

I would like to specify a location in ServiceEvent, and have it be of type Location, but the types seem limited to those in the database.

What's the course of action in this scenario? Is this what I want to do, or am I confused on the implementation of what I want?

Thanks in advance for any 开发者_开发问答help you can give!


You're looking for a feature called Complex Types. Best answer I can give is the MSDN documentation.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜