New Posts New Posts RSS Feed: Newbie question
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Newbie question

 Post Reply Post Reply
Author
livedevil View Drop Down
Newbie
Newbie


Joined: 11-Jun-2010
Posts: 3
Post Options Post Options   Quote livedevil Quote  Post ReplyReply Direct Link To This Post Topic: Newbie question
    Posted: 11-Jun-2010 at 1:01am
Hi there, I'm new to DevForce.

I'm following the tutorial to build an silverlight application via this file : c:\Users\Public\Documents\DevForce 2010\Learning Resources\030_BaseApps\SilverlightApps\Tutorials\100SLV_Tour\Part 1_Tour of DevForce Silverlight.pdf

I knew it's easy enough, but when I finished the tour step by step, I got an error said the "mgr.Employees" doesn't exist. but "mgr.Employee" is OK. I checked the class and found it's a generated code, I also checked the samples with tutorial at c:\Users\Public\Documents\DevForce 2010\Learning Resources\030_BaseApps\SilverlightApps\Tutorials\100SLV_Tour\CodeCS\Tour_Pt01Completed\ , everything is fine in this sample solution, it's just "Employees".

Did I miss something? I wanna use "Employees" but "Employee", please tell me how to set this property.

VS2010, DevForce universal 6.0.2

Regards.
Back to Top
livedevil View Drop Down
Newbie
Newbie


Joined: 11-Jun-2010
Posts: 3
Post Options Post Options   Quote livedevil Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jun-2010 at 1:31am
Oh I know, it's really simple, just change the Entity Set name in edmx.
Back to Top
GregD View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 374
Post Options Post Options   Quote GregD Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jun-2010 at 1:45pm
By default, the EF4 designer pluralizes new objects (see the "Pluralize New Objects" property on the ConceptualEntityModel). The first time you save the model, there's a checkbox provided with the setting of that property (which is checked by default). Did you uncheck it? Otherwise the name of your EntitySet should have been named "Employees" automatically.
Back to Top
livedevil View Drop Down
Newbie
Newbie


Joined: 11-Jun-2010
Posts: 3
Post Options Post Options   Quote livedevil Quote  Post ReplyReply Direct Link To This Post Posted: 11-Jun-2010 at 7:53pm
Thanks GregD, you're right.

The "Pluralize New Objects" property wasn't checked by default in my situation, I missed this detail.

Regards.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down