Created
August 8, 2021 19:32
-
-
Save marcfabregatb/e894723d113ce0cb959d12395327ef56 to your computer and use it in GitHub Desktop.
quering values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<IActionResult> Edit(string id) | |
{ | |
if (string.IsNullOrWhiteSpace(id)) | |
{ | |
return NotFound(); | |
} | |
var blogEntry = await _context.BlogEntries.Include(x => x.Categories).FirstOrDefaultAsync(x => x.Id == id); | |
if (blogEntry == null) | |
{ | |
return NotFound(); | |
} | |
return View(blogEntry); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment