locked
Change the datasource & EF Provider during Run- and Debugtime RRS feed

  • Question

  • Hi everyone,

    about 9 months ago, I filed this MS Connect - entry:

    Change the datasource & EF Provider during Run- and Debugtime

    A few month later, I received a statement like "maybe... maybe not...". Now, due to demand, I need a final statement on this issue. I know, I've been bugging for a while in this Connect - entry, but it's pretty urgent.

    Thursday, March 15, 2012 8:52 AM

Answers

  • Hi, in my option, different servers have different SQL environment, so it is not possible to determine a common connection string which suits for all databases, in order to make the LightSwitch application works under these environments, it is necessary to modify the connection strings manually.

    Wednesday, March 21, 2012 1:29 AM

All replies

  • Did you consider writing WCF ria service and usin gthis in the LS application, so the background database is handled by the WCF service and your LS development studio does not need to remap from one DB type to another? If you decided not to go that way, can you explain why not?

    Jan D'Hondt - Database and .NET development

    Thursday, March 15, 2012 11:00 AM
  • Hi Jan,

    Yes, I considered it. It's not that I decided against this way, but it's just that it doesn't feel "right". Of course I can work around this, but it's not as easy as Lightswitch should be.

    Thursday, March 15, 2012 1:07 PM
  • "Not as easy as LightSwitch should be" is definetly a complement to LS. Well LS is meant to make things easy but there are some requirements where "coding is NOT optional". If I were e member of LS Team (yeah right) I would be very happy to read your comment.

    I have to agree with Jan that RIA is your option. Try to feel right with it :-).


    1+1 = 3 for large values of 1


    Thursday, March 15, 2012 9:09 PM
  • Yeah,

    I know that RIA is the way to go. But, however, it shouldn't be too hard to create an appropiate solution.

    Monday, March 19, 2012 8:04 AM
  • I agree with Daniel too,

    If you make a database app on your developer pc on an existing test-database, deploying it to more than one production server, should be parametrizable, so that the connectionstrings can be different from one server to the other. I am human and I am afraid that one day I might forget to modify the connection string after deployment of my updated app on the production server.


    Jan D'Hondt - Database and .NET development

    Monday, March 19, 2012 8:56 AM
  • Hi, in my option, different servers have different SQL environment, so it is not possible to determine a common connection string which suits for all databases, in order to make the LightSwitch application works under these environments, it is necessary to modify the connection strings manually.

    Wednesday, March 21, 2012 1:29 AM
  • Thanks Jan for agreeing with me. :)

    FightAsABull,

    it's not about determing a common connectionstring for all database environments. LS should be able to automatically remap the given fields to a new database (type) with the same structure, which is, atm, not possible.

    Tuesday, March 27, 2012 7:27 AM