Generics, Interfaces, Providers and You - Part 2:IDataObject & IProvider
In part 1 we covered the web.config changes and the classes needed to use them. We also created a ProvidersRepositoryGeneric class to load and manage providers. But what good is a repository of providers if there is nothing to provide? While the Provider model can be used for other things aside from data operations, this series is focusing on data access. If you need a moment to go back and read Generics, Interfaces, Providers and You - Part 1:Getting Started feel free, we will be he...
[More]
Generics, Interfaces, Providers and You - Part 1:Getting Started
There are many uses for providers with accessing a data store being one of the most common. I'm not going to talk about why to use providers, I am going to address how to use generics and interfaces with providers to make using them a bit easier. For this series we are going to use a "ContactInformation" object with a few sub-classes, "HomePhoneNumber" and "EmailAddress". using System;
using System.Collections.Generic;
using System.Text;
using ObjectHelpDesk.DataAcc...
[More]
Enum - the good, the bad, the ugly and how to kill them
The blessed enumeration I remember when I first learned about enumerations; they opened a whole world of easy coding and I think they have their place….CommandType anyone? But really, let's kill them. How often have you seen this… enum StatusEnum { Active, Inactive, New, Deleted }
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, "Courier New", courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.cs...
[More]