0

I'm creating a model in a Sql Server database to support the next scenary.

Persons Table to hold the information of all kind of people that will interact with the application.

Patients Table to hold those persons that are Patients of the medical system.

and Doctors, that are those peoples that attends the patients.

The problems comes, because I want to use model first approach and I'm need to let Entity framework power tools to generate my POCO classes, so i need that EF Power tools recognizes this particular scenario, and don't map navigation properties in the Patient Class or the Person class, and instead of this, I need that power tools map an Abstract class for the Person Entity, and a Patient, and Doctor class that inherits from Person Abstract class.

How can I achieve this using model first approach? Since I don't want to manually create code first conventions and write all my classes by myself.

So, please someone help me.

spajce
  • 7,044
  • 5
  • 29
  • 44
Carlos_0202
  • 26
  • 1
  • 4
  • Powertools will only give you a first draft of the classes. After that, you have to modify the model the way you want it. – Gert Arnold Nov 03 '13 at 09:40
  • this is good only if you dont plan to modify it, but im beggining with a basic code and when the model changes all the changes could be lost when reverse engineering in the future, so i need to know if there is a way that i can build the relationships in the database so power tools can recognize them. Thanks for your contribution @GertArnold – Carlos_0202 Nov 03 '13 at 19:39
  • That's the point. You use Powertools once and then proceed code-first. I think you should work database-first. – Gert Arnold Nov 04 '13 at 10:03

0 Answers0