Newbie question
Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1882
Printed Date: 25-Mar-2025 at 6:16pm
Topic: Newbie question
Posted By: livedevil
Subject: Newbie question
Date 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.
|
Replies:
Posted By: livedevil
Date Posted: 11-Jun-2010 at 1:31am
Oh I know, it's really simple, just change the Entity Set name in edmx.
|
Posted By: GregD
Date 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.
|
Posted By: livedevil
Date 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.
|
|