background preloader

Most Read

Facebook Twitter

Programming Interview Questions and Answers: Entity Framework transaction scope examples. Transactions as a core building block of entity framework. The DbContext object which we heavily use for interacting with the database uses transactions internally without you having to do anything extra. In case you need to manually provide transaction support, here is how you can do it.

In this post, I cover three cases in which transaction scope is being used to show rollback when an error occurs during an update of multiple entities:when you have multiple save calls to the context;when you have single save with multiple object; and transactions across multiple contexts. Let’s first review our simple model and context object. To re-create this project, use Visual Studio 2010 console project with Entity Framework 5.0 RC bits from nuget. Our model is a simplified version of a “Product” object and it’s definition look like this: Our context definition looks like: As always, please do leave your thoughts and comments. Knowledgebase - activePDF Technical Support. Canvas Fireworks. Creative CSS3 Animation Menus. Sample App with Backbone.js and Twitter Bootstrap. Backbone.js is a lightweight JavaScript framework that provides the basic infrastructure (Model, Collection, View, and Router classes) to bring structure to your Web applications. Twitter Bootstrap is a UI toolkit that provides simple and flexible HTML, CSS, and Javascript to implement popular user interface components and interactions.

In other words, Backbone.js and Twitter Bootstrap focus on different areas of your application: core architecture and user interface respectively. Because of their well-defined and non-overlapping scope, Backbone.js and Twitter Bootstrap work well together. In general, I find a lightweight architectural framework and a UI toolkit to be a powerful combination, and an interesting alternative to full-stack frameworks: it gives you the flexibility to choose the library you like (if any) in the respective areas of your application.

The Sample Application You can run the application here. Twitter Bootstrap highlights Backbone.js highlights One-to-Many association. Performance and the Entity Framework. Introduction If you are using the Entity Framework (EF), then you need to understand the best practices for improving its performance, or you will suffer the consequences! Background My team has spent almost 2 years with the first version of the Entity Framework in an enterprise application (including the beta). Our application has a Service Oriented Architecture (SOA) that uses the .NET 3.5 Framework SP1, SQL Server 2008 and IIS 7.0 on Windows Server 2008. Best Practices Our application has a database with 400+ tables, some of which are very inter-connected. The following sections in this article will explain these best practices in more detail- so read on!

Pre-generated Your View The most expensive operation (it takes over 50% of the initial query) is View Generation. Running this tool will create a code file (either .cs or .vb) with a pre-generated view that can be included and compiled in your project. The EdmGen.exe tool is installed in the .NET Framework directory. Use Compiled Queries. jQuery's replaceWith and using it to create a new insertion mode for Ajax update targets - Building Web Applications.

Custom MVC ModelBinder with Complex Models/Objects/Interfaces using built in MVC Validation. I’ve been creating some cool stuff using ASP.Net MVC 3 lately and came across a situation where I’d like to have quite a complex model/object bound to an Action on my Controller based on a set of posted values from a form. In order to do this, a custom ModelBinder is necessary to collect the data from the posted values, turn it into my custom object, and bind that object to my Action’s parameter. The easy part is to write code to turn the posted values into my custom object and return it, the tricky part is trying to get the in-built back-end MVC validation working for my model… which is currently using DataAnnotations. I really didn’t feel like writing my own logic to validate my model against DataAnnotations and also didn’t want to write the logic to take into account that DataAnnotations might not be the current developers validation provider of choice. So after much digging through the source of MVC and using Reflector, I finally found the solution.

Powerful New CSS- and JavaScript-Techniques (2012 Edition) Advertisement Since our last round-up of useful CSS techniques1, we’ve seen a lot of truly remarkable CSS geekery out there. With CSS3, some of the older techniques now have become obsolete, others have established themselves as standards, and many techniques are still in the “crazy experimentation” stage. Since the release of the previous post, we’ve been collecting, sorting, filtering and preparing a compact overview of powerful new CSS techniques. Today we finally present some of these techniques. Please note that many techniques are not only CSS-based, but also use HTML5 and JavaScript. Table of Contents CSS Transitions And Animations CSS transitions and animations are often used to make the user experience a bit more smooth and interesting, especially when it comes to interactive effects on hover or on click.

CSS3 dodecahedron9 A fancy dodecahedron experiment, created using CSS Transforms and a tiny JavaScript snippet. Beercamp: An Experiment With CSS 3D21 A CSS 3D popup book á la Dr. Coding Horror. K. Scott Allen. In software development we face many constraints, and we usually think of constraints as bad things that make our jobs miserable. If we had no constraints, we’d build beautiful software with impeccable error handling because there would be no errors.

In one of my first jobs I wrote firmware for lab devices. Each device had a 32kb ROM for program storage, and those 32kb of memory constrained the type of software I could create, and the tools I could use. As an aside, the limited memory did not constrain me from destroying small thermal printers attached to each device because 32kb is still big enough to hide the machine code that writes to memory-mapped IO in an accidentally infinite loop. Constraints don’t always have to be a negative, however, and I was reminded of this when reading Scarcity: Why Having Too Little Means So Much.

Scarcity captures our minds automatically. But the other half of the book highlights the unintuitive benefits of scarcity. A Scarcity Of Time. Article Archive. Smashing Magazine. New addtions to the 1,000+ jQuery Plugins Directory. Scott Hanselman. According to the Microsoft Support website: "Core isolation is a security feature of Microsoft Windows that protects important core processes of Windows from malicious software by isolating them in memory.

It does this by running those core processes in a virtualized environment. Memory integrity is one feature of core isolation which regularly verifies the integrity of the code running those core processes in an attempt to prevent any attacks from altering them. We recommend that you leave this setting on, if your system supports it. " Cool. Be aware: Do be conscious of each driver and what it does and consider what functionality - if any - you'll be losing if you remove them. Ok, ready? Turns out this was added way back in 2017 in Windows 10 build 17093. I ran the Windows Security app on my system and noticed a few things. In order to be considered enhanced, your system needs to support: Some of these technologies are quite old and have been in Windows for a while.

Wmic sysdriver get name.