public async Task <IActionResult> Index(long?id) { var history = await _repository.Info(id ?? 0); if (history == null) { return(BadRequest()); } CaseHistoryViewModel model = new CaseHistoryViewModel { CaseHistory = await _repository.Info(id ?? 0) }; model.Tabs.Add(nameof(CaseHistoryGeneralInfoViewComponent).ViewComponentName(), _localizer[nameof(Resources.GeneralInfo)]); model.Tabs.Add(nameof(CaseHistoryRecordsViewComponent).ViewComponentName(), _localizer[nameof(Resources.Records)]); return(View(model)); }
public async Task <CaseHistory> Info(long id) => await _repository.Info(id);