1

I have a project about survey application on web. I have to use MVC 4 Code First and I have to use abstract class to derive other classes. I just need a logic of this structure and coding. I've shared my database schema with you below which is built on MySQL Workbench. I want to use Code First to make this schema possible for my Model Classes. I need to finish this project until Monday.

Schema :

http://imageshack.com/a/img547/4278/q2or.png

tereško
  • 58,060
  • 25
  • 98
  • 150
OwnurD
  • 195
  • 1
  • 3
  • 17
  • What answers are you looking for exactly? Is your question _"How do I create model classes"_? If you already have a database, you can [generate the model classes from your database](http://stackoverflow.com/questions/10126871/entity-framework-generating-classes). You can then take a look at how the models are generated, and you'll see they'll differ very little from how you would create them by hand. Also, I think you mean _"Entity Framework Code First"_, not MVC's. Or do you mean you have to create View models for MVC based on EF's models? – CodeCaster Jan 04 '14 at 17:49
  • As you said I want to do this database design with Entity Framework Code First not Model First or Database First. I did the project by using Model First and now I have to redesign this database schema by using Code First. And model classes will be derived by the abstract class. – OwnurD Jan 04 '14 at 18:37
  • So, what is your question? What (code) do you have, and what parts are you having trouble with? – CodeCaster Jan 04 '14 at 18:53
  • How do I use abstract class to derive other classes? I need some examples ? And I need one example about one to many relation between questions and questionTypes tables by using code first. Finally, Is this schema designed correctly ? (questionTypes table includes types of question like Textbox or Dropdownlist etc., testSubject table includes the name of person who answered the question) I am sorry for my english by the way. – OwnurD Jan 04 '14 at 19:15

0 Answers0