KallDrexx's Blog

  • Asp.Net Membership Provider's Lifetime Considerations- Part 2

    Previously I made a post about issues I encountered with the Asp.Net Membership Provider. My fix was a bit short-sighted as it only fixed the issue in one location, when the account controller tries to perform operations. The problem with my solution is that it does not deal with all...

  • Beware of Asp.Net's Membership Provider Lifetime, Entity Framework Caching, and Dependency Injection

    I recently struggled while dealing with a bug I encountered in my Asp.Net MVC application, and I thought I would write about it to hopefully help someone else. I have a method in my business layer that users use to change their password. After implementing unit tests to verify the...

  • Keeping Asp.NET MVC Controller Constructors Clean In a Dependency Injection World - Part 2

    Previously I wrote a post an article about a way to keep Asp.net MVC constructors clean with heavy dependency injection. In that post, which can be found here, proposed creating the following class to resolve dependencies on demand: public class WindsorServiceFactory : IServiceFactory { protected IWindsorContainer _container; public WindsorServiceFactory(IWindsorContainer windsorContainer)...

  • A ViewModel Based Data Access Layer – Persisting Data

    So far in my design of a Data Access Layer that I outlined in my last two posts dealt with retrieving data from the database, so now I want to explore the second half of a data access layer, how you persist data in the database. Facade Of Simplicity Contrary...

  • A ViewModel Based Data Access Layer – Optionally Consolidated Query Classes

    After thinking upon my data access pattern outlined in my last post, I came up with the following interface to use for queries: public interface IQuery<TViewModel, TCriteria> { TViewModel Execute(TCriteria criteria); } I am very happy with this idea, as it seems to have multiple advantages over current data access...