// this guy generates the accounts for a lead public ViewModel.AccountInformationViewModel GenerateAccountsViewModel(int leadId) { ViewModel.AccountInformationViewModel viewmodel = new ViewModel.AccountInformationViewModel(); var account = _AccountRepository.GetAccountsByLeadId(leadId); if (account == null) { viewmodel.account = new Data.Domain.Account() { ParentLead = leadId }; } else { //to be modified //viewmodel.account = account; } return(viewmodel); }
public void SaveAccountInformation(ViewModel.AccountInformationViewModel avm) { _AccountRepository.SaveAccounts(avm.account); }