public async Task <IActionResult> EditAlert(int?id) { var alert = await _datacontext.Alerts .Include(s => s.Status) .FirstOrDefaultAsync(p => p.Id == id); if (id == null || alert == null) { return(NotFound()); } var model = _converterHelper.ToAlertViewModel(alert); return(View(model)); }