public virtual async Task <ActionResult> Editor(int?id) { if (id != null) { var record = await CurrencyService.FindByIdAsync(id.Value); if (record != null) { return(View(await _currencyModelFactory.PrepareCurrencyModelAsync(record))); } } return(View(await _currencyModelFactory.PrepareCurrencyModelAsync(null))); }