Skip to content

Instantly share code, notes, and snippets.

@smashdevcode
Created July 10, 2017 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smashdevcode/2df0bf08ff30bb5bc29ba64047d6ce4a to your computer and use it in GitHub Desktop.
Save smashdevcode/2df0bf08ff30bb5bc29ba64047d6ce4a to your computer and use it in GitHub Desktop.
public static ComicBook GetComicBook(int comicBookId)
{
using (var context = new Context())
{
return context.ComicBooks
.Where(cb => cb.Id == comicBookId)
.SingleOrDefault();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment