Back in 2012, I wrote a post about how to use the decorator pattern with StrutureMap. Since then, StructureMap 3.0 has been released, and it’s actually much easier to apply decorators now! Read on, and I’ll show you. [more] Back in 2012… The StructureMap 2.6.x API didn’t provide a clean way to decorate things. You…
try-catch-FAIL
Month: <span>June 2015</span>
Gulp with ASP.NET: am I doing it wrong?
I hope the answer to that question is a very loud, emphatic, “YES!” I like gulp! I want to use it! And I’ll confess up front that I’m still very green with gulp. I know there are a lot of things it can probably do that I’m not taking advantage of. But, I feel like…
Ditching StructureMap’s ObjectFactory
Another question people ask after they’ve watched my App Framework course at Pluralsight is, “What should I do now that StructureMap’s ObjectFactory has been deprecated?” Actually, it’s more like a cry for help rather than a question. It goes like this: “AAHHHHHH OBJECT FACTORY IS GOING AWAY WHAT DO I DO?? AHHHHHHHHHHHHHHHHHH!!” Or at least…
Encapsulating Query Logic in MVC Apps Without the Repository Pattern
One of the most common questions I get when people see a video or presentation about how I build MVC applications is, “Why don’t you use the repository pattern?” There are a lot of reasons not to use the repository pattern, and they’ve been well-covered by others. But, one valid benefit they provide is encapsulation…
Returning Multiple Result Sets from a Stored Procedure Using Entity Framework 6
I know, I know, you’re already rolling your eyes! “Stored procedures??!?” But hey, sometimes a stored procedure is the best solution to a problem! Entity Framework allows you to call stored procedures quite easily out of the box, but working with sprocs that return multiple result sets isn’t so easy. Here’s a handy extension method…