6
If I generate my database for Mysql using the concept of Code First is it possible to change it to SQL Server in the future with relative ease? Need to change the classes or just the config and the preview?
6
If I generate my database for Mysql using the concept of Code First is it possible to change it to SQL Server in the future with relative ease? Need to change the classes or just the config and the preview?
6
The idea of the Entity Framework is this, you develop in a way independent of the database. It even has some facilities to make the migration.
This is not to say that any code you make will be well exchanged without major problems. In basic the transition should be smooth. If you start doing very customized operations using very specific things from a database that cannot be easily reproduced by another bank then you may have performance problems or even not function as expected.
In general the model does not need to be changed at all, but it may need some adaptation. A very good index in one database may not be as suitable in another. The physical structure in one DB may not be ideal in another. It doesn’t mean it won’t work, but adaptations will help. Queries and manipulations may need more adaptations to get everything in order.
The quality of preview from the database to the Entity Framework can make a difference.
Show. As you said I understand that there must be specific situations that may require a little more change but if overall the RU manages to solve most cases I intend to follow this path. I haven’t chosen Provider yet, but the idea is to start with Mysql and soon migrate to Sqlserver and see how it behaves. Thank you
Browser other questions tagged c# mysql .net sql-server entity-framework
You are not signed in. Login or sign up in order to post.
As far as I know, the Entity Framework abstracts the database completely. Changing the database should be as simple as changing the connection string on the web.config (and referencing the DLL’s that have the correct providers).
– Oralista de Sistemas
I thought about it. If that’s all it is.
– rodrigorf
Using Code First your classes generates the bank, is how it was done in Clipper, will create the tables and fields according to the need of the system, can even be productive but I think bad this.
– Harry
When modeling the database you have an overview of the system, the relationships, if it can meet the needs, reports and possible problems, you already part to the programming with a ready model.
– Harry
As to using more than 1 bank, if you use ORM it will take into the system the particular characteristics of each bank, not as simple as migrating bank and will need to maintain more than 1 version of the system,
– Harry
the advantages of using ORM disappear with increasing complexity as it is necessary to promote a break of abstraction by forcing the developer to handle SQL.
– Harry
All I know is that calling EF "garbage" can only be a compliment to EF...
– FabioIn