Skip to content

Instantly share code, notes, and snippets.

@evgomes
Created January 30, 2019 19:00
Show Gist options
  • Save evgomes/683412268007ec31a78cc97b0e65b7d4 to your computer and use it in GitHub Desktop.
Save evgomes/683412268007ec31a78cc97b0e65b7d4 to your computer and use it in GitHub Desktop.
Real logic of FindByIdAsync and Update from CategoryRepository, of Supermarket API
public async Task<Category> FindByIdAsync(int id)
{
return await _context.Categories.FindAsync(id);
}
public void Update(Category category)
{
_context.Categories.Update(category);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment