Entity Framework Inheritance Basic question
i not getting around digging entity framework. have basic model contains following entities:
- person
- customer (inherits person)
- employee (inherits person)
i add person database:
dim dtc as new myentitymodelcontainerdim n as new person
n.firstname =
"john"n.lastname = "doe"
dtc.addtopeople(n)
dtc.savechanges()
dim dtc as new myentitymodelcontainer
dim n as new employee
n.firstname = "john"
n.lastname = "doe"
dtc.addtopeople(n)
dtc.savechanges()
but since have john in database already, want employee, how that?
then on top of that, john both employee , customer?
what doing, have database filled "persons" , if customer or employee seperate tables "customer" table , "employee" table. have 1 pool choose "persons" know how customers , employee's
Silverlight > Programming Silverlight with .NET – General
Comments
Post a Comment