c# - Entity Framework user select database target -


So here's my question for my open source project that it is necessary that we store the contents of the cache on the file system Let us, currently we serial the cache in JSS and store it as plain text files. Since we want to move away from this solution in future versions, we are now exploring a way to store cash in a database. In our current plans, the user is likely to decide which database he wants to use (such as SQL Server Compact, pre-existing databases etc.). Now my questions are:

  1. Is there something like this that can be achieved with EF? Can I switch the database when the application is running, or do I need to re-compile the application for switching the database?
  2. Is the best way to do this would be EF or am I looking for better solutions?

      Can such things be achieved with EF? Can I switch the database while running the application, or do I need to compile the application for switching the database? If you have separate databases like Oracle, MS SQL etc., in EF you have to create separate models for each of them and then the distribution to the client depends on what database they are using.  
      Is EF the best way to do this, or am I looking for a better solution?   

    It is entirely up to you, you can probably get it from simple ado.net but before the model for flexibility EF code and T4 code generator gives you the best option In which your domain data, data access layer, business rules will be similar to different databases. You just need to modify the connection in the application Config file.

    I hope this will help you.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -