Hands-on Labs for Microsoft Enterprise Library 5.0 and Unity 2.0

May 28, 2010

Hands-on Labs for Microsoft Enterprise Library 5.0 and Unity 2.0 Enterprise Library 5.0  is out there for over a month. With every release of Enterprise Library, The Patterns &  Practices team is always launching a set of hands-on labs which can help you to get started with Enterprise Library and to understand how you can work with it in order to implement cross cutting ...

VS2008 No Item Templates

May 26, 2010

VS2008 No Item Templates While trying to add a new web form item to a project at a customer, I got the following error: After pressing the OK button I got an empty Add New Item menu:   A little scary screen… So I went to the Event Viewer as suggested in the error message and looked at the event in the Application log which was:   So I closed all the VS2008 instances I had...

Building a Simple Logging Http Module with Logging Application Block

May 21, 2010

Building a Simple Logging Http Module with Logging Application Block I wanted to check how to use the fluent configuration API  for the Logging Application Block in Enterprise Library 5. So I thought to myself why not implement it with an http module and provide two examples in one post. Using the Fluent Configuration API with Logging Application Block I wrote a post about the fluent configuration in Enterprise Library 5  in the past. Here is how I configured the Enterprise Library container in order to use the Logging Application Block in a simple flat file scenario: private void ConfigureEnterpriseLibraryContainer(){ var...

Annoying Build Error while Implementing the IControllerFactory Interface

May 20, 2010

Annoying Build Error while Implementing the IControllerFactory Interface Today I wanted to check something  in the MVC framework in regard to the   implementing the IControllerFactory interface. I couldn’t guessed that it will take me ten minutes to figure out an annoying build error which I will explain here how to resolve it. The Scenario You want to implement the IControllerFactory interface but not in ...

How to Manage ObjectContext Per Request in ASP.NET

May 18, 2010

How to Manage ObjectContext Per Request in ASP.NET We started a new project at work. One of my guidelines was to manage the lifetime of the Entity Framework’s ObjectContext as context per request. Since I got some questions in the area I decided to explain how you can achieve that. Why to Use an ObjectContext Per Request? In a previous post I wrote about this subject. The main issue is that the context should be a short living object. Since this is the case but we want to gain all the advantages of using the context (which include lazy loading, change tracking...

Using Stub Entities in Entity Framework Screencasts

May 14, 2010

Using Stub Entities in Entity Framework Screencasts Today I recorded my first two screencasts (one in English and one in Hebrew) about how to use stub entities in Entity Framework in order to produce better performance by reducing database round trips.  The link to the English version can be found here.  The link to the Hebrew version can be found here.You can also download the screencasts in the details tab if youlike. Enjoy!

How to Retrieve Stored Procedure Output Parameters in Entity Framework

May 9, 2010

How to Retrieve Stored Procedure Output Parameters in Entity Framework One question that raises from time to time in EF forums is how you can retrieve stored procedure output parameters in EF Function Import. This post will show you how to do that. The Stored Procedure In the example I’m going to use the following stored procedure: CREATE PROCEDURE dbo.SchoolBudgetForDateRange @StartDate DATETIME, @EndDate DATETIME, @Sum money outputASSET NOCOUNT ON;SELECT @Sum = SUM(Department.Budget)FROM Department WHERE StartDate BETWEEN @StartDate AND @EndDate The stored procedure returns the school budget for a given date. By of course the...
one comment

How to Add Silverlight Installation to IE8 Installation Package using IEAK8

How to Add Silverlight Installation to IE8 Installation Package using IEAK8 During the last weeks I’m helping Microsoft customers to create custom installation packages to Internet Explorer 8. In this post I’ll explain how to add Silverlight installation to the generated installation package of IE8. Using IEAK8 In order to create custom installation packages for Internet Explorer 8 you first need to download the Internet Explorer Administration Kit 8 or IEAK8. You can download the tool from here. How to Add Custom Component? When running IEAK8 we can add custom components such as Silverlight installation to the generated installation package. How to do that?...
no comments

Book Review – Clean Code – A Handbook of Agile Software Craftsmanship

May 7, 2010

Book Review – Clean Code – A Handbook of Agile Software Craftsmanship Today I finished reading Robert C. Martin’s wonderful book -  Clean Code – A Handbook of Agile Software Craftsmanship. The book is all about writing quality code. It is full of examples  of good and bad code and a lot of suggestions for how ...
no comments