public IActionResult BlockEdit(int id) { _loggerManager.Info($"BlockEdit({id}) was requested"); var block = _planRepository.GetBlock(id); if (block == null) { _loggerManager.Warn($"BlockEdit({id}): A block was not found"); return(BadRequest()); } ViewData["Step"] = block.Step; var blockEdit = new BlockEditDTO { Description = block.Description, Id = block.Id, Instruction = block.Instruction, Title = block.Title, Step = block.Step }; _loggerManager.Info($"BlockEdit({id}): A block was successfully found"); return(View("BlockEdit", blockEdit)); }