Skip to content

Instantly share code, notes, and snippets.

@tkellogg
tkellogg / ModelsAndViewModels.cs
Created September 16, 2011 03:05
AutoMapper example for my blog (http://timkellogg.blogspot.com)
public class Account
{
public virtual int AccountId { get; set; }
[Matches(@"[A-Z]{2}\d{5}")]
public virtual string Code { get; set; }
[Required]
public virtual string Name { get; set; }
public virtual int? Age { get; set; }
}
@tkellogg
tkellogg / SiteVisitWorkflow.cs
Created March 8, 2011 16:44
Abstract workflow factory & example usage (SiteVisitWorkflow) for ObjectFlow
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using kpa.mko.dal;
using kpa.common.workflow;
using Rainbow.ObjectFlow.Stateful;
using kpa.common.container;
using kpa.common.interfaces;