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