October 28, 2010
Update Configurations Without Replacing Them Using Enterprise Library 5 Fluent Configuration API
I got a question today in an article I published about the fluent configuration API in Enterprise Library 5. The question was how to add a database connection string to an existing configuration during runtime. The person who wrote the question also published a specific solution which I refactored to a general purpose solution that I’ll show in this post.
When you use the fluent configuration API the ConfigurationSourceBuilder class has just one method to update the configuration which is UpdateConfigurationWithReplace. This method updates the configuration source and...
October 27, 2010
IE9 for Web Developers Session Next Thursday (4.11) I’m having a session about Internet Explorer 9 for web developers. The session will take place at Microsoft Ra’anana between 08:30 and 13:00 and it is free. In the session I’m going to present IE9 (which is currently in its beta version) and talk about the main issues that every web developer will need to know when he or she is programming web sites and web applications. If you like to hear this session you can still register the event from this link. Hope to see you there....
October 25, 2010
Exposing a Stored Procedure in WCF Data Service Today I answered a question in the data platform development forums. The question was simple – how to expose a stored procedure which is mapped to an Entity Framework model through a WCF Data Service. This post will show you exactly how to do this. The Stored Procedure First I’ve created a the following stored procedure: CREATE PROCEDURE dbo.GetCoursesOrderByTitle
SET NOCOUNT ON
October 22, 2010
Teched Israel 2010 Here I Come Teched Israel 2010 is going to happen next month in Eilat between the 28-30 of November. On this Teched I’ll have the pleasure to present a session about building N-Tier applications by using Entity Framework 4. In the session I’m going to discuss the considerations and approaches for building these types of applications on top of EF4. For more details about the development tools and technologies track (which is the track I’m participating in) go to the following link: http://www.microsoft.com/israel/TechEd2010/Tracks/DEV.aspx Hope to see you there. ...
Sela Open House – Introduction to Entity Framework 4 Slide Deck On last Wednesday I had a Sela open house about EF4 in Sela Haifa. I want to thank all the people who came to hear the session. The agenda of the open house included: Introduction to EF How to query and manipulate data using EF EF4 I published the session slide deck and demos in my SkyDrive and you can download it from this link. Enjoy! CodeProject
October 17, 2010
Using the ControllerActivator in MVC 3 In the previous post I showed how to use the DependencyResolver in order to bring Dependency Injection behavior to a MVC 3 application. In this post I’ll show you how you can use the ControllerActivator in order to activate controllers using your own behavior. The IControllerActivator In MVC 3 beta a new interface was introduced – the IControllerActivator. This interface is an injection point in order to create our own behavior in order to activate controllers. That interface is discoverable using the dependency resolver. If you don’t implement the interface...
Dependency Injection in MVC 3 Was Made Easier In the past I wrote a post that showed how to implement Dependency Injection using Unity in ASP.NET MVC framework. This post revisits that post and shows how you can do the same thing easily in MVC 3. Pay attention that the supplied code is based on MVC 3 beta and may change in the future. The IDependencyResolver and DependencyResolver MVC 3 introduces a new interface – the IDependencyResolver. This interface enables service location by providing two methods: GetService(Type serviceType) – this method...
Sela Open House – Entity Framework 4 On this Wednesday evening I’m going to deliver an open house in Sela Haifa. The session is going to include an introduction to Entity Framework, How to query and manipulate data and a section about Entity Framework 4. If you are interested and want more details about the event or want to register you can go to the following link. For the list of open houses that Sela conducts go to this link. I hope to see you there. CodeProject
October 12, 2010
Back to Basics – OnBeforeUnload Event
The OnBeforeUnload event is fired prior to a page being unloaded. This is the last place that you can prevent the loss of unsaved data before leaving the page. In order to use the event you can wire a handler...
October 11, 2010