N
N
Nevega2018-03-29 19:45:27
PostgreSQL
Nevega, 2018-03-29 19:45:27

Is it possible to change CodeFirst / dbFirst approaches in C# ,EF during development?

Hello.
I delve into EF and actually the following question arose:
I had a database, from it I generated classes / models using the DataBaseFirst method, respectively.
Further, in the course of work, it will be necessary to add a column or table.
Can I change the method to CodeFirst after the initial setup (class generation)?
I will also be grateful if anyone has an article at hand - material on understanding (quick start, better, of course) in EF
thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MrDywar Pichugin, 2018-03-29
@Nevega

I have never switched, but I think there should be no problems to generate classes and use them for CodeFirst.
I even watched the video (to search for a long time), in which they did just that, they just used some kind of extension to get models from the database.
But there won't be much difference. The main thing is to remove the code from the generation stage.
After all, you can change EF to something else, you can do anything.
And the question is googled right away - https://www.codeproject.com/Articles/1078074/Migra...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question