Skip to content

Instantly share code, notes, and snippets.

@mikecole
Created March 7, 2014 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikecole/9414215 to your computer and use it in GitHub Desktop.
Save mikecole/9414215 to your computer and use it in GitHub Desktop.
Automapper Multiple Sources
public class AccountSummaryViewModel
{
//Comes from account
public int AccountID { get; set; }
public string AccountName { get; set; }
public DateTime ExpirationDate { get; set; }
//Comes from paymentInfo
public string PaymentMethod { get; set; }
//Comes from history
public IEnumerable<Transaction> Transactions { get; set; }
public class Transaction
{
public int ID { get; set; }
public DateTime TransactionDate { get; set; }
public decimal Amount { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment