AsyncFixer icon indicating copy to clipboard operation
AsyncFixer copied to clipboard

Code is sometimes mangled if it is a sync call that is supplying a method argument

Open ChairmanMawh opened this issue 1 year ago • 0 comments

Consider this:

  Assert.AreEqual(1, dbContext.Person.Count());

AF raises 02 for this and suggests CountAsync(), but asking VS to make the change results in:

  await Assert.AreEqualAsync(1, dbContext.Person.Count());

rather than

  Assert.AreEqual(1, await dbContext.Person.CountAsync());

ChairmanMawh avatar Jun 01 '24 06:06 ChairmanMawh