I don't understand how "Discriminator" column created using code first approach? How Entity Framework understand it's data type? with it's specific size as well? please somebody answer me
How discriminator column is created in database table when there is no property corresponding to it in the entities(Employee, Permanent, Contract) created ? For e.g FistName column is created in database table which is referred from Employee entity, in similar fashion from which property discriminator column is referred? Please clarify. Thanks in advance!
I have a question. When i choose radiobutton for either PermanentEmployee or ContractEmployee, their columns are not displayed in right order , except for 'All Employees'. First Column in Gridview doesn't start with ID. I notice that first few columns in gridview are the first properties in derived class do i have use DataTable to manually put columns in the way i want? (like in Convert method for 'All Employees')
This video is not using entity framework. when I tried using entity frame work it was throwing errors as below Error 1 Cannot implicitly convert type 'TPHEFDBFMVC.Models.TPHEmployee' to 'TPHEFDBFMVC.Models.PermanentEmployee'. An explicit conversion exists (are you missing a cast?) D:\EntityFrameworkExamples\TPHEFDBFMVC\TPHEFDBFMVC\Controllers\PMEmployeeController.cs 30 51 TPHEFDBFMVC have any idea how to get out of this?
Can anyone suggest me a way in which we can map foreign keys and navigation properties defined in the subclasses, while using TPH with fluent API? I will be really thankful.
one and only channel of internet .. for study entity entity framework .. properly.... thanks
MR. kudvenkat
Best teacher on the planet !
I don't understand how "Discriminator" column created using code first approach? How Entity Framework understand it's data type? with it's specific size as well? please somebody answer me
If I understand this, EF creates this based on the inheritance, since PM : E and CE : E
How discriminator column is created in database table when there is no property corresponding to it in the entities(Employee, Permanent, Contract) created ? For e.g FistName column is created in database table which is referred from Employee entity, in similar fashion from which property discriminator column is referred? Please clarify. Thanks in advance!
This link answers for the above question -> stackoverflow.com/questions/7393788/entity-framework-code-first-creates-discriminator-column
thxx
How this "Discriminator" column created without specifying into the code. Pls explain this Venket
I have a question.
When i choose radiobutton for either PermanentEmployee or ContractEmployee, their columns are not displayed in right order , except for 'All Employees'.
First Column in Gridview doesn't start with ID.
I notice that first few columns in gridview are the first properties in derived class
do i have use DataTable to manually put columns in the way i want? (like in Convert method for 'All Employees')
Keep posting Venkat, its awesome !!!
can anyone pls explain that how discriminator column been created? I cant understand, any folks?
This link answers for the above question -> stackoverflow.com/questions/7393788/entity-framework-code-first-creates-discriminator-column
This video is not using entity framework. when I tried using entity frame work it was throwing errors as below
Error 1 Cannot implicitly convert type 'TPHEFDBFMVC.Models.TPHEmployee' to 'TPHEFDBFMVC.Models.PermanentEmployee'. An explicit conversion exists (are you missing a cast?) D:\EntityFrameworkExamples\TPHEFDBFMVC\TPHEFDBFMVC\Controllers\PMEmployeeController.cs 30 51 TPHEFDBFMVC
have any idea how to get out of this?
a gouri kumar when you use DBContext and you set the DBSet to a class, you are using EntityFramework...
I must say restless man for .net community..... Thanks...
thnx a lot sir....very nicely explained
Can anyone suggest me a way in which we can map foreign keys and navigation properties defined in the subclasses, while using TPH with fluent API? I will be really thankful.
Actually I am confused between this and splitting the table into two entities, could some one tell me the main difference?
Isn't the employee table supposed to be abstract?
Thanks!
Thank u so so much
Why isnt the employee class abstract?
What the hell You didn't Add a migration ??
then hows the database created
it gets automatically created because it has already been deleted