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