Thanks Mitch,

 

Currently, change the database structure is not an option. Seems like it
would, but this example is showing what needs to be accomplished, but
it's not actually languages and translations.

 

Thanks

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Mitch Wheat
Sent: Monday, 31 May 2010 12:49 PM
To: 'ozDotNet'
Subject: RE: Starting out with Entity Framework

 

That's not in 1st Normal form.

 

One possibility: If you have a known, finite list of languages to
support add extra columns to the Month table for each language.

 

or create a general lookup table that contains 3 columns, englishword,
languageID, translatedword.

 

My 2 cents.

 

Mitch

 

From: [email protected]
[mailto:[email protected]] On Behalf Of Clint Colefax
Sent: Monday, 31 May 2010 10:30 AM
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

 

 

<<image001.jpg>>

Reply via email to