none
context.Database.SqlQuery<string> triggers schema creation RRS feed

  • Question

  • my database initialiser first queries database for some data to find out if it has needed stored procedures. When I execute context.Database.SqlQuery<string>(...) it triggers database schema creation. Which option controls this?

    .NET guy

    Saturday, February 9, 2013 5:31 PM

Answers

  • I was trying to explicitly call Initialise. After I have Changed code to use Database.SetInitialiser it worked ok

    .NET guy

    • Marked as answer by tsadigov Sunday, February 10, 2013 12:24 PM
    Sunday, February 10, 2013 12:24 PM

All replies

  • I was trying to explicitly call Initialise. After I have Changed code to use Database.SetInitialiser it worked ok

    .NET guy

    • Marked as answer by tsadigov Sunday, February 10, 2013 12:24 PM
    Sunday, February 10, 2013 12:24 PM
  • Thank you

    Ghost,
    Call me ghost for short, Thanks
    To get the better answer, it should be a better question.

    Monday, February 11, 2013 7:52 AM