Thank Andrew,
I did try this, but the setter on the EF class is generated code, and I don't want to be changing generated code. Pity it's not a partial member like some of the other members created by EF. Thanks From: [email protected] [mailto:[email protected]] On Behalf Of Andrew Tobin Sent: Monday, 31 May 2010 3:04 PM To: ozDotNet Subject: Re: Starting out with Entity Framework You could map the string for the months to a string in your class, and on the setter, do the logic to put it into the list, and on the getter make it back into the correctly ordered string? On Mon, May 31, 2010 at 2:02 PM, James Chapman-Smith <[email protected]> wrote: Hi Clint, You can easily use partial classes to add the list of months member to the generated classes from entity framework. Will that do what you need? Cheers. James. From: [email protected] [mailto:[email protected]] On Behalf Of Clint Colefax Sent: Monday, 31 May 2010 12:00 To: [email protected] Subject: Starting out with Entity Framework Hi all, I'm starting out with Entity Framework (.NET 3.5) and am curious if it can handle the following scenario and how to go about implementing it. Say I have single table like so TableName: Languages Columns: Name TranslatedMonths An example row would be Name=English TranslatedMonths ="Jan, Feb, Mar...." In the entities layer, I want this represented as to types of classes, ClassName: Languages Memebers: Name List(Of Months) Can I do this with EF? Where do I start. I've played a bit with this scenario but can't seem to get it to where I want. I've done a bit with Partial Classes for this so far, but I'm just not happy with trying to keep the String property created by ef in sync with my custom added list property. For this I'd like to remove the property from the entity in the designer, but not sure how then to have that database value loaded so I can parse it out into my list. Thanks Error! Filename not specified.
