Browse by Tags

Tagged Content List
  • Blog Post: Free Code: WriteOnlySet<T>

    So had a fun business entity that needed a write only set of data that contained no duplicates (involved a security auditing trail if you care to know). That's when I realized we didn't have anything like this in the BCL. So here's a fun little ISet<T> implementation that proxies any existing set...
  • Blog Post: Yes you can execute PARAMETERIZED sprocs with EF Fluent API Code Only (and more!)

    This is really an add-on to this post here . Turns out most people were only thinking that you could execute SQL strings only as opposed to detailed parameterized SQL statements. That's not correct. It's all supported and approved. Scenario 1. Using Parameterized SQL statements So this covers...
  • Blog Post: Simple WCF netMsmq Example (or Step 1 to stop reinventing yet another MSMQ clone)

    It's pretty obvious that MSMQ is a bit of a dark art out there. People know it exists, everyone knows someone somewhere that knows a guy who once did something with it, and like practitioners of esoteric arts, the technology is looked upon with distrust. In fact to the point that I see team after team...
  • Blog Post: Powershell Automation and Remoting (a c# love story)

    OK all of you readers out there should know and love Powershell by now and you are using it constantly, right? If not get on with it! One of the most exciting things that came out of version 2 was the ability to perform remoting. Basically the ability to connect a session to a remote system and have...
  • Blog Post: Yes you can execute sprocs with EF Fluent API Code Only

    OK let’s make this clear. You can totally call SQL Functions, SQL SPROCS, or any other raw SQL statement and use it in EF Code Only. What you don’t get is automatic or fluent API configuration statements that perform this mapping work for you and by default, no tracking occurs on the materialized...
  • Blog Post: Map private properties with EF Fluent API

    So until we get EF 4.2 and the support for enumerations as first class citizens those of us needing support have resigned ourselves to the simple fact that we are forced to expose a property for the integer value for EF to use and wrap that value with a convenience property that casts it as the appropriate...
  • Blog Post: Using reflection to determine if an event is static

    So if you happen to have an EventInfo class and need to determine if the event is static or instance, it isn't actually immeidately clear if this is supported. Most of the MemberInfo basic types expose a property named IsStatic that indicates if this member is static or not. If you've ever worked with...
  • Blog Post: Modifying ASP.Net Providers at Runtime

    How to add providers at runtime programmatically So if you are like me, you are a fan of not reinventing the wheel. This is especially true of components like Membership, Roles, Authentication, Personalization and whatnot. While I take some issue with the choice of API and can think of many improvements...
  • Blog Post: Unit Testing Repositories, a rebuttal. Or "How to use proper decoupling to unit test the repository pattern"

    For primers, you need to read this post first: http://buffered.io/2008/07/29/unit-tests-boldly-crossing-boundaries-and-gently-breaking-rules/ So the other day I received an email from a group that I am assisting in understanding TDD, Test Concepts, and Separation of Concerns, and they asked, "Is this...
  • Blog Post: DataServices, IErrorHandlers, Exceptions and the Gulf between them.

    OK I am going to let you in on a dirty little secret about Astoria based services. This secret is probably not even known to you. Ready to hear it? Really? Well here it is: You'd better never have anything go wrong as you'll never know it. It devours exceptions and is hungry for more! "What?!?...
  • Blog Post: Query Providers ARE Still Data Access Code!!

    So everyone reading this (or at least hopefully everyone) will know that putting data access logic into the UI is anti-pattern of all anti-patterns. I am going to sidestep the issue of simple utilities and one-off screens and trivial applications for the purposes of this discussion. We're instead focusing...
  • Blog Post: An alternative to the WIF ClaimsPrincipal IsInRole implementation (free code)

    So let me start with by saying that I love the Geneva Framework. Stuart Kwan and team have so far produced a most excellent product. In fact, we were so impressed with it we struck an agreement with the WIF team back in early 2008 to get access to the source tree so that we can produce some highly customized...
  • Blog Post: Handling the Tri-state asynchronous result dilemma

    So in most programming languages and environments you have will define an operation that performs some type of interesting work. Let's call that ReallyInterestingMethod() ™ . ReallyInterestingMethod accepts any number of inputs and returns exactly one output ( void or value as some type). The language...
  • Blog Post: Extension methods to reduce AspNet Cookies Collection bugs

    My buddy Spook was lamenting the other day about the unintuitive behavior of the ASP.Net Cookies collection. You can read the fully bits here before continuing. I decided that methinks this is a case for some extension methods! If you are someone that wants to tweak this behavior to support the pattern...
  • Blog Post: LINQ: Building an IQueryable provider series

    A set of links that I'm posting because 1) I don't want to lose them and 2) they're handy for people to read. Reusable IQueryable base classes Where and reusable Expression tree visitor Local variable references Select Improved Column binding Nested queries Join...
  • Blog Post: WCF VS Item Template Grabbag

    The latest in this series . Here's a 'grabbag' of VS item templates you are welcome to. The set consists of: a custom authorization manager a logging IErrorHandler and attribute to use it with your service WCF Duplex Service WCF One Way Service WCF Streaming Service WCF Untyped Service...
  • Blog Post: WCF Solution Template

    Another in the series of free Visual Studio templates I personally use being posted. This one creates a recomended WCF solution containing Contracts, Commands, Gateway, and Service stubs. In addition, standard items such as IErrorHandler and Authorization Manager are added. Files are attached to the...
  • Blog Post: NUnit Project Template

    This is the first in a long line of custom templates that I use on a daily basis. Nothing too fancy, it's just that they save some of the boilerplate work I have to do. This one allows you to create a new test project with NUnit, Linq, and Moq all set up for you to go. Files are included in the post...
  • Blog Post: Work Around Your ASP.Net Session Serialization Issues

    OK. We're going to assume everyone here knows about ASP.Net Session state. We also will assume that you know there's 3 modes, InProc (default), State Server, and SQL. The latter two will be the topic of discussion here. The biggest difference between the InProc and out of process state management systems...
  • Blog Post: Creating Nullable<T> When You Don't Know T

    This bit came about from a post from Brad Wilson back in July that some of my Magenic buddies sent me. I won't repeat what his issues are (you can read it for yourself) but here's the solutions to his misunderstandings regarding nullable types. Maybe I’m missing something here that’s subtle in his...
  • Blog Post: Handy Extension Methods

    This entry was edited July 16th, 2008 to include an additional extension method courtesy of Alex James //Copyright (c) 2008 James Zimmerman //Permission is hereby granted, free of charge, to any person obtaining a copy //of this software and associated documentation files (the "Software"), to ...
  • Blog Post: Threads, meet Transactions...

    Using multi threading and transactions in .Net OK this is a pretty simple idea but one that I don't think people grok very well. Or at least the code I keep running into doesn't make one think that the writers of said code get ambient transactions in the least bit. Basically what I am talking about...
Page 1 of 1 (22 items)