I have an application that uses a model on Entity Framework. Is there any function (in DBContext etc) by calling which I can create all tables associated with this model in the database or create a single table that I specify?
2 Answers
You can use Code First Approach to do this. http://www.entityframeworktutorial.net/code-first/entity-framework-code-first.aspx
2 Comments
If you're using a Code First approach then Entity Framework will build the table for you. It looks like you are not using Code First, so you will have create the table in the database. I assume you're using an Entity Data Model (.edmx)? If so, you will create your table in the database, then update your data model (.edmx). If you have not yet created your .edmx file, you need to do that - the .edmx file will contain all your CRUD operations.