Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET Framework entity
Hi folks,
I'm new to Entity Framework. I have small application which connects to a MySQl database with six tables (some of them are "thing", "thingplace", "thinggroup", ...).
I've created the EF model but when I wanted to use it inside of my code I realized all generated ObjectSet classes has a "1" attached to them for example "Things1", "ThingsPlaces1", "ThingPlaces1" and so on. I definitely want to remove them.
Any help is highly appreiated.
Thanks.
Posted 18-Jan-13 1:16am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can do that on the edmx designer. Click on your entity, right-click, select properties (you can alt+enter after selected the entity aswell). Then, you'll find that name under "Entity Set Name". Just change their names to whatever you like and it'll keep that way on the following updates.
  Permalink  
Comments
FH791 at 19-Jan-13 12:50pm
   
Thanks.That solves the problem but I'm still confused why EF designer behaves this way????

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 6,745
1 OriginalGriff 6,696
2 CPallini 5,315
3 George Jonsson 3,599
4 Gihan Liyanage 2,650


Advertise | Privacy | Mobile
Web04 | 2.8.140922.1 | Last Updated 18 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100