Visual studio feeds

All Visual Studio blogs in one place

Subscribe

Enter your email address:

Delivered by FeedBurner

Increase your website traffic with Attracta.com

Google+

Contact

Email:
Subject:
Message:
Anti-spam: How many eyes has a typical person?

Follow us on FB

Search

Entity Framework Pitfalls: Command Interceptors and Identity Keys

AddThis Social Bookmark Button
The IDbCommandInterceptor (sorry, no official documentation) interface was introduced in Entity Framework 6 as part of the new interception and logging API, and allows the interception of the SQL and its parameters that are sent to the database as the result of DbContext CRUD operations.It offers two methods for each of the basic ADO.NET operations, those defined in DbCommand, one called before the operation is executed, and the other called afterwards:
ExecuteNonQuery (UPDATEs, INSERTs, DELETEs) –> NonQueryExecuting, NonQueryExecuted;
ExecuteScalar (SELECTs returning a single value) –> ScalarExecuting,
ScalarExecuted;
ExecuteReader (SELECTs returning rows) –> ReaderExecuting, ReaderExecuted.

As usual, the methods ending with “ing” are executed before and those ending with “ed” are executed afterwards, always synchronously.One might naively assume that INSERTs would always trigger a NonQueryExecuting/NonQueryExecuted call, and indeed it is so, unless we have an IDENTITY primary key, in which case, Entity Framework will instead call ReaderExecuting/ReaderExecuted. It’s easy to understand why: when we use an IDENTITY, we need to retrieve the generated value immediately after the INSERT, hence Entity Framework will generate code like:

Managing your Azure VM’s with your Phone

AddThis Social Bookmark Button
I have been doing quite a bit of ALM Training recently and have been trying to figure out how best to manage my training VM’s. In the last few months I have taught both the Managing Projects with Microsoft Visual Studio Team Foundation Server 2013 and TFS 2013 Developer Fundamentals a number of times and [...] The post Managing your Azure VM’s with your Phone appeared first on naked ALM - Experts in ALM, TFS & lean-agile with Scrum.

The Morning Brew #1787

AddThis Social Bookmark Button
Software OneGet (it’s in the Windows 10 Preview!) – Garrett Serack Announcing PostSharp 4.1 Preview 4: Xamarin Support, and More – Gael Fraiteur Modern.IE Chrome Extension – Leon Liang Updates for the F12 developer tools in the Windows 10 January Technical Preview – Ruben Rios Information Azure WebJobs are awesome and you should start using […]

Excerpts from the RavenDB Performance team report: Optimizing Memory Comparisons, Digging into the IL

AddThis Social Bookmark Button
Note, this post was written by Federico. Where I had notes or stuff to extend, I explicitly marked it as such. In the previous post after inspecting the decompiled source using ILSpy  we were able to uncover potential things we could do. Did you remember how dotPeek and ILSpy didn’t agree on the last for-loop? dotPeek ILSpy Well to really know which one is right, lets dig deeper. Looks like dotPeek is just too smart for our purposes.
href="http://ayende.com/blog/Images/Windows-Live-Writer/Excerpts-from-the-RavenDB-Performance-te_7935/image_6.png"> MSIL is an stack machine, so everything has to be pushed to the stack to be operated. And the lower you go the less context you have to make optimization choices. The compiler knows a lot more, therefore it can make sensible choices that the JIT can’t. Well this is one of those, the problem here is that the compiler is treating those native memory references in a very “un-native” way, leaving small room to the JIT to do its magic. Therefore we are going to give the compiler a nudge to point him in the...(Read whole news on source site)

A Session in Web Components & Polymer Meetup

AddThis Social Bookmark Button
In two weeks, I will deliver a session called “Build Reusable Components Using HTML5 Web Components” as part of a Web Components & Polymer Meetup. This is going to be my first speaking engagement in 2015 and I’m excited to be in JavaScript Israel (one of the biggest Meetups in Israel) for the first time. […]

Textures

AddThis Social Bookmark Button
With very little around in the way of 4k content I decided to set about creating something for myself and others to enjoy.  Of course the project ended up snowballing and has resulted in the release of the “Textures” video (I believe the first commercial 4k release in the UK!).  I thought I should write […]

Home