6

I am working on an asp.net mvc-4 web application and i am using Entity Framework 5.0 . now i have mapped my sql server 2008 tables using entity framework with database first approach. but i got this strange issue after completing the mapping, now inside my database i have a table named ""People as follow:-

enter image description here

but on the generated edmx file the table was renamed as "Person" , here is how the entity looks like inside my edmx file :-

enter image description here

here is the generated model class:-

    using System;
    using System.Collections.Generic;

    public partial class Person
    {
        public long CIID { get; set; }
        public string ATTRIBUTE_1202 { get; set; }

        public virtual BaseElement BaseElement { get; set; }
        public virtual Requester Requester { get; set; }
        public virtual Technician Technician { get; set; }
    }
}

so can anyone adivce why the "People" table is presented as an Entity named "Person" inside the .edmx file ?

Backs
  • 24,430
  • 5
  • 58
  • 85
John John
  • 1
  • 72
  • 238
  • 501

1 Answers1

6

I think, you checked option "Pluralize or aingularize generated object names". So People means many, Person means single.

enter image description here

Usually, it just adds or removes s and es in the end, but in some cases it does more complex replacements.

Backs
  • 24,430
  • 5
  • 58
  • 85
  • in the world of Entity framework every thing is possible :) , and your reply sound valid to me ..i thought there is something wrong inside my project but seems this is normal... – John John Nov 25 '15 at 12:47
  • This could be very misleading, although persons is not often used today, [see this](https://www.quora.com/Diction-and-Word-Usage-When-is-it-grammatically-correct-to-say-persons-instead-of-people) – Nilay Vishwakarma Sep 07 '16 at 18:55