Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created November 8, 2023 19:27
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 dcomartin/86c2dd5c21d474ac737d60d34f61ec13 to your computer and use it in GitHub Desktop.
Save dcomartin/86c2dd5c21d474ac737d60d34f61ec13 to your computer and use it in GitHub Desktop.
public class Test
{
[Fact]
public async Task Single()
{
var db = new TestDbContext();
await db.Orders.SingleAsync(x => x.OrderId == 1000);
}
[Fact]
public async Task First()
{
var db = new TestDbContext();
await db.Orders.FirstAsync(x => x.OrderId == 1000);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment