Last post Mar 31, 2017 08:37 AM by demoninside9
Mar 30, 2017 07:00 AM|demoninside9|LINK
I started learning MVC with Enitity framework.
I have created DB and project. I was wondering that one object which I never created neither in project nor in databse, but from where this object came.
I have database table UserDetail but this object came with the name of UserDetails, with a extra "s".
see the image below
see the highlighted objects.
from where this UserDetails object came?
Mar 31, 2017 05:39 AM|Eric Du|LINK
According to your description, as far as I know, UserDetails is a DbSet of your records. About why with a extra "s", as far as I know, you could get the answer from this tutorial:
Student and Standard class, in this case. DbSet is a collection of entity classes (aka entity set), so we have given property name as plural of entity name like Students and Standards.
Simple Code First Example:
Mar 31, 2017 08:37 AM|demoninside9|LINK
Thanks You So much Eric to elaborate.