Entity model adds “s” at the end of table names

When I create Entity Model in my ASP.NET application it adds “s” at the end of each entity name, i.e. if my table name is “SiteUser” in database it becomes “SiteUsers” in Entity Model. How can I prevent it?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Open your EDMX file, click on an empty space in your designer view and in the properties window set Pluralize New Objects to False.

Method 2

If you look at the properties of your entity model, than you will find the property “Pluralize new objects”, set it to false to stop adding the s to your new added objects.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x