views:

73

answers:

2

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?

+4  A: 

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.

Paulo Santos
+1  A: 

Paulo is right for EF 1 (+1). For EF 4, I'd suggest using code-only modeling instead.

Craig Stuntz