Skip to content

Instantly share code, notes, and snippets.

@tkellogg
Created September 16, 2011 03:58
Show Gist options
  • Save tkellogg/1221166 to your computer and use it in GitHub Desktop.
Save tkellogg/1221166 to your computer and use it in GitHub Desktop.
Another AutoMapper example using polymorphism
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; }
}
public class AccountViewModel : Account
{
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment