Hi James,

 

Yes it does, that is what I have done, and most of the time this would
work fine. It's just a little messy keeping the string and the list in
sync. I'm probably going to break this up into 2 classes, and while
these entities are being created, we use a lot of the build in methods
on the list class, but then it's saved into a varchar value in the
table. As I've not used entity framework before, I was trying to keep a
single set of entities, but I'm starting to think it best to split these
up.

 

Thanks for your feedback.

 

From: [email protected]
[mailto:[email protected]] On Behalf Of James Chapman-Smith
Sent: Monday, 31 May 2010 2:03 PM
To: 'ozDotNet'
Subject: RE: Starting out with Entity Framework

 

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

 

 

<<image001.jpg>>

Reply via email to