Code Monkey home page Code Monkey logo

Comments (5)

steveschmitt avatar steveschmitt commented on September 15, 2024

I've noticed that EF connects to the database to when we ask it for metadata. I assume it's to check for schema updates. I don't know how to turn that off.

from breeze.server.net.

randellhodges avatar randellhodges commented on September 15, 2024

I figured it would be an EF problem. Just putting this out there, more for documentation purposes.

This is the dummy connection string I'm using. The call to Metadata with it takes about 1.6 seconds. Again, if you do this in a static, or do it once and then just use the results in a static file, that solves the problem in production.

Data Source=(LocalDb)\v11.0;Initial Catalog=dummy;Integrated Security=True;Connection Timeout=1

from breeze.server.net.

marcelgood avatar marcelgood commented on September 15, 2024

Did you set the DB Initializer to null as in the example? Without that, EF will try to create the database.

Database.SetInitializer<NorthwindDtoContext>(null)

from breeze.server.net.

randellhodges avatar randellhodges commented on September 15, 2024

I did. It still hung for about 15 seconds. Using the dummy connection string cut it down to under 2 seconds.

from breeze.server.net.

randellhodges avatar randellhodges commented on September 15, 2024

I am going to close it because I don't really think this is a problem with Breeze itself.

I would suggest that, whenever you have time, a note in the documentation that describes this way of doing things can incur a heavy delay. Either don't do it at all in production, or do it once and hold the metadata in a static and return it in the Metadata method.

from breeze.server.net.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.