1

I have auto generated legacy MS SQL database with encoded column and table names, and text file with codes and description of corresponding tables and columns. Is is possible to use names from text file on model creating using Entity Framework database first?

2
  • If you want database first, why don't you use the structure of the database? Commented Nov 10, 2017 at 18:35
  • What does the text file look like? Commented Nov 10, 2017 at 20:46

1 Answer 1

2

No, there's nothing built-in that will do that for you. You can write a program that reads the text file and outputs a C# code file with the entity definitions and mapping attributes.

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

2 Comments

If he used a T4 template, it's answer of sorta because the T4 template runs before the code compiles to build the entities, but it's still code that has to be written :)
+1 T4 is probably the best language to write this in, as it's designed for this sort of thing and integrated with Visual Studio.

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.