0

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?

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

Comments

1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.