Created
September 16, 2011 03:05
-
-
Save tkellogg/1221098 to your computer and use it in GitHub Desktop.
AutoMapper example for my blog (http://timkellogg.blogspot.com)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
{ | |
public virtual int AccountId { get; set; } | |
public virtual string Code { get; set; } | |
public virtual string Name { get; set; } | |
public virtual int Age { get; set; } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment