EF 6.1.3 first-generation EDMX during Code execution

We use Code first Entity Framework 6.1.3 (MSSQL 2014) and had problems with the performance of LINQ queries.

The first query would take 3.5secs after you apply the fix suggested on https://www.fusonic.net/en/blog/3-steps-for-fast-entityframework-6.1-code-first-startup-performance/ here

It worked and now it is 1.5 seconds. We are still working with views pre-generated to LINQ calls less than 1 sec.

I download the patch on codeplex.com and compiled EF. This has been fixed in EF released by Microsoft? or other alternatives?

public class MyContextConfiguration: DbConfiguration {public MyContextConfiguration() {string cachePath = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData) + @ "\YOUR_APP_NAME\EFCache\";}} MyDbModelStore cachedDbModelStore = new MyDbModelStore (cachePath); DependencyResolver IDbDependencyResolver = new SingletonDependencyResolver (cachedDbModelStore); AddDependencyResolver (dependencyResolver); } private class MyDbModelStore: DefaultDbModelStore {private static Boolean useCachedDbModelStore; / / Note that you must activate only normal DbContextStore, run scenarios without migration.} Migration is currently not supported and will fail. Public Shared Sub Configure (bool useCachedDbModelStore) {MyContextConfiguration.useCachedDbModelStore = ;} public useCachedDbModelStore MyContextConfiguration() {/ / CachedDbModel store currently nicht immer verwendet wird, da er z.b. bei migration currently noch nicht works (im EF Code Exceptions) if (useCachedDbModelStore) {MyDbModelStore cachedDbModelStore = new MyDbModelStore (MyContext.EfCacheDirPath);}} DependencyResolver IDbDependencyResolver = new SingletonDependencyResolver (cachedDbModelStore); AddDependencyResolver (dependencyResolver); private class}} MyDbModelStore: DefaultDbModelStore {public MyDbModelStore (location of the string): base (rental) {} public override DbCompiledModel TryLoad (contextType Type) {path string = GetFilePath (contextType); if (File.Exists (path)) {DateTime lastWriteTime = File.GetLastWriteTimeUtc (path);}} DateTime lastWriteTimeDomainAssembly = File.GetLastWriteTimeUtc (typeof (TypeInYourDomainAssembly). Assembly.Location); If (lastWriteTimeDomainAssembly > lastWriteTime) {File.Delete (path); Tracers.EntityFramework.TraceInformation ("Cached db model obsolete. Re-creating cached db model edmx.") ;}} else {Tracers.EntityFramework.TraceInformation ("no cache db model found. Creation of cached db model edmx.") ;} basic performance. TryLoad (contextType); } } } }

Hello

Your question is beyond the scope of this community.

Please repost your question in the SQL Server TechNet Forums.

https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

See you soon.

Tags: Windows

Similar Questions

  • Problems of first-generation iPad app development test

    I just created my first iPad app, and I try to test the development with a first generation iPad app. But iTunes fails to install the application on the iPad during synchronization.

    The error message indicates that the application is not compatible with the iPad and the iPad needs a "new version of the software for the iPad." But the iPad first generation already has software available: OS 5.1.1

    What is going on? What is the solution?

    You cannot create a new application for iOS5/iPad1. Single edition apps are

    created automatically to version 28 for members of creative cloud.

    Pro or business users can always backsave one version.

    Older apps will continue to operate.

  • The first generation wireless charger Apple Watch will be compatible with series 2 Watch?

    Apple Watch of first-generation wireless charger won't be compatible with the new watch series 2? I just have to make sure before I buy a new charger wireless with my new watch.

    I guess it will be. There is no differentiation in store for the accessories of the watch.

  • If I have the first generation iWatch I'll be able to get the update for new applications and look at faces?  I know that I couldn't display or the waterproof function to the water.

    If I have the first generation iWatch I'll be able to get the update for new applications and look at faces?  I know that I couldn't display or the waterproof function to the water.

    Hello

    The next operating system update, watch OS 3, will be available for all Apple Watch models, including the first generation watches.

    We should go out on 13 September, after which it can be installed by following the steps detailed here:

    More information:

    http://www.Apple.com/Watchos/

  • I cannot pair the new Apple TV Remote app with my first generation Apple TV.

    I cannot pair the new Apple TV Remote app with my first generation Apple TV. Someone knows what to do?

    You can use the old, now called iTunes Remote? A new one seems really targeted to ATV 4.

  • iPhone 1 (first generation) Sim Card tray

    Anyone know a source for the purchase of an an iPhone SIM card Tray 1 (first generation)? I have mine since 2007. My wife is an educator specialized and I would use the phone like an iPod Touch, basically. I have to get the iPhone enabled in order to use it, but requires a SIM card. The original plate is missing. I searched Amazon, eBay and the web in general. Can't seem to find a. Any ideas? I also have an iPhone 3G with a SIM tray but the tray does not adapt to the iPhone 1. Thanks for any help or ideas.

    I think you'd find it difficult to find, because of his age and that the 1 G is now a bit of a collectors item. If it is in good nic, other than the missing sim tray, I would keep it hidden and buy an iPod Touch (same one used) then set up a search saved in ebay for the Board and try and get your hands on one.

    It may be easier to buy a whole phone, I just did a search of ebay for the entire phone and they are ranging from £35 for one with a screen broken up to £3 500 for an open box.

  • Is the iPad first generation support the latest applications from the App Store?

    I want to know if iPad first generation takes care of all new version of apps on iTunes app store... Thank you..

    No, it won't. You may be able to download the latest compatible version of an application, but it will not be the latest version. -AJ

  • WiFi problem with iPad 4 on first generation Airport Express

    Bad problem with iPad 4 / iOS9. It seems that it is connected to the wifi (my old airport express of first-generation lists my iPad as a connected device and in settings of the iPad, the connection has the usual blue tick). BUT Internet works only for a few seconds after a reboot (hard) and there is no icon of wifi signal on the status bar (to keep for the first few seconds after the eboot). All other devices (iPhone 6 on ios8.2, iPad 2, two Macs and a PC) work fine on the airport express (first generation). Stranger still, when I go into a public café with wifi on the road, the iPad 4 connects no problem at the station, on the status bar and the internet works, I see the usual wifi antenna icon. Final oddity, it suddenly stopped working and no software / firmware updates between the two. As mentioned, soft and hard that it recharges don't help in saving a few seconds DNS cannot be a problem because all other devices work correctly.  I also tried to reset the network settings. It is esoteric.

    As a test, temporarily change the wireless network name and password on the AirPort Express.

    Make the name of... well very simple wireless network, no special characters (like an apostrophe) and no space empty. Ditto for the password.

    Can the iPad4 connect that way?

  • How can I see netflix on my apple first generation tv

    How can I see netflix on my apple first generation tv

    Netflix is not available on the ATV1. Only gen 2 or later...

  • Be honest with us, Google TV sides first generation will never get an update

    Update 3 was released for the 2nd generation of Google Tv devices, what are the chances to see an update beyond stability for first generation devices?

    The crossing ARMS probably killed the 86 gen x, but some of us spent quite some money in devices.

    software update (GM V3.2_2012091701 version) is already available for 1st generation devices Sony Google TV, which offers the following benefits:

    • The Google game service now includes movies, TV shows and music
    • Adds the new application of Google play movies

    The Android OS is updated automatically in Google TV live if it is connected to the Internet. Internet TV devices have been recently updated the operating system Android 3.2.

    Follow the steps mentioned on the link below to check the version of the software.

    http://www.KB.Sony.com/selfservice/documentLink.do?externalId=C1026343

    If my post answered your question, please mark it as an "accepted Solution".

  • Currently, I run the design and the Web Premium CS6 on a first generation MacBook Air and want to buy a new MacBook Pro. How will I know if I can install my programs on the new Adobe computer? Because I know that there is some sort of limit.

    Currently, I run the design and the Web Premium CS6 on a first generation MacBook Air and want to buy a new MacBook Pro. How will I know if I can install my programs on the new Adobe computer? Because I know that there is some sort of limit.

    Also, I had to install the software twice on my computer before because I had to restart the computer. I don't know if this affects the limit.

    You are allowed to have two facilities activated, so it shouldn't be a problem with facilities to work on both machines.  If by chance you somehow tied up two activations for a machine you can have Adobe support help solve this cat thrue.

    Serial number and activation support (non - CC) chat

    http://helpx.Adobe.com/x-productkb/global/Service1.html ( http://adobe.ly/1aYjbSC )

  • Data during the execution phase - feet?

    Nobody had any problem with the upper distance display right watch FT rather MI, during an execution? I noticed that as soon as I change the playback screen, sometimes it shows feet and sometimes miles... I wonder... change miles after that race is detected?

    before reaching a.01 miles, the distance will be displayed in feet.

  • Generation of LabVIEW Code Fix cannot run

    I'm using LabVIEW 2011. I try to use DAQmx support for generating a pulse of my USB-6259 signal. LabVIEW jumped out an error message 'Generation of LabVIEW Code cannot run.

    I try to reinstall LabVIEW 2011, but the error is still there. Help, please

    Problem went after DAQmx and LabViEW re - install.

    Thank you

  • How to lock "Write to file measure VI" during the execution of the request for this file cannot be opened during execution.

    Hello

    I have an application where I am external hardware data acquisition and save it in a file using "Write to measure file VI.

    During the application run on time; When the user opens ".» LVM text file "; abendons-saving application of the data obtained in the prescribed file but continues to demand on external hardware data acquisition. When I stop the application; an error message is poped indicating that an error has occurred due to open running.

    My question is: How can I block this file in which the data is saved, so that the user cannot open it during the execution of the application?

    Looking forward for your kind suggestions in this regard.

    Kind regards

    Jamal

    Hi Jamal,.

    It has been said many times before: use simple simple file features!

    Opening a file with a default access "read/write" will disable access to this file to other programs!

  • How do 'Enum Control' disabled during the execution of an executable application and make activated when the application is stopped/abandoned?

    Hello

    I use a "Enum control" on the façade of an executable application built with application builder for LabVIEW 2013 full professional development system. I want Enum control remains activated prior to execution of this request so that I can choose any value from the list of available numeric values, but when I run this application; Enum control should become disabled so that the user can not select another value in the list of data during application execution values so that the default setting remains unchanged during the execution of this application. Enum control must also be activated when the application is stopped/abandoned so that the user can select any value.

    Could someone pls suggest a solution to this problem?  If I select the active state' to 'Disabled' in appearance tab then all listed values becomes disabled.

    Concerning

    Jamal

    I suggest to use the node property of persons with reduced mobility.  You can then disable the enum at the beginning of the program and then activate it in the judgment.

Maybe you are looking for