Reputation: 63300
I have an application where I create database's dynamically in a SQL Server using Server Management Objects through my application.
I want to use the Entity Framework to access this database when it has been created, is this possible? As I can not generate Entity classes from a database in VS. I do have the structure of the database of course.
So is it possible to create the Entity classes manually and is that a do-able task?
Upvotes: 0
Views: 921
Reputation: 126587
Paulo is right for EF 1 (+1). For EF 4, I'd suggest using code-only modeling instead.
Upvotes: 1
Reputation: 11587
Yes, it's completely possible. You can even manipulate the generated code if you want.
What you might want to take a look is the EDMX XML specification.
In that file you specify the underlying database, views, functions, procedures and the like, as well as the desired objects. Take a look at MSDN in order to have more information.
Upvotes: 4