1

any advice on this?

I built a db in sql server 2008 (only tables, no sp's and triggers) tables do use identity columns. In my asp.net app, i generated an EF model from the database. I use linq to talk to my entities. site works brilliantly.

what I want to experiment with (and stop me if I am speaking crazy talk) is to generate a new MySql db from the entity model, and config my app to use that instead, still using the same linq logic.

is this possible?

Thanks

1 Answer 1

1

If you try it don't forget to backup your old EDMX file before you start playing with MySql. EDMX file consists of three parts where one is fully dependent on type of database server you are using. When you generate database from model, two parts of the EDMX file are completely replaced (including the database dependent part) so once you try to generate MySql database from the model your mapping to SQL Server will be lost (replaced by mapping to MySql database).

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

2 Comments

whew glad you told me that - well it would be in my source control but still. good to know!! thanks. is it worth expirimenting with? sqlserver hosting costs are quite high while the mysql is free but are their pitfalls in this approach. EF2MySql ? or should i just be biting the bullet. I can manage either or, but from a performance point of view is their any advantage to staying on the stack?
It is up to you. SQL server and EF provider for SQL server are both MS products. Whole EF is created and tested to work with SQL Server and SQL Server CE. MySql provides its own provider for EF. You can try it, make some tests and see if it works with your application.

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.