public async Task <ActionResult> Edit(int?id) { if (id == null) { return(Json(false)); } else { tbl_crm_leads findLead = await leadsManager.GetLeadByIdAsync(id).ConfigureAwait(false); LeadsEditViewModel leadEditViewModel = Mapper.Map <tbl_crm_leads, LeadsEditViewModel>(findLead); leadEditViewModel.CountryList = await leadsManager.GetAllCountryAsync().ConfigureAwait(false); leadEditViewModel.SourceList = await leadsManager.GetAllSourceAsync().ConfigureAwait(false); return(PartialView(leadEditViewModel)); } }