public ActionResult Create() { Account account = new Account(); var contacts = _contactQueries.GetAll(); account.Contacts = contacts; var viewModel = _mapperForAccount.MapToAccountCreateViewModel(account); return(View(viewModel)); }
// GET: Contact public ActionResult Index() { var contact = _contactQueries.GetAll(); var viewModel = _mapperForContact.MapToContactViewModel(contact); return(View(viewModel)); }
public ContactsCollection Get() { return(Collection(_contactsQueries.GetAll().ProjectTo <ContactResource>())); }
protected override async Task <IReadOnlyList <EditableContact> > LoadAsync() { return(await Task.Run(() => _contactQueries.GetAll().Select(a => new EditableContact(a)).ToList())); }