Proposal: AsMaybeAsync
mollsju opened this issue · comments
Joakim commented
Hello!
Any chance AsMaybeAsync
could be added, just as we have ToResultAsync
?
It would allow for less clutter when combined with EF.
Current:
Maybe<Entity> maybeEntity = (await dbContext.Entity.FirstOrDefaultAsync(x => x.Id == EntityId)).AsMaybe();
With AsMaybeAsync:
Maybe<Entity> maybeEntity = await dbContext.Entity.FirstOrDefaultAsync(x => x.Id == EntityId).AsMaybeAsync();
Vladimir Khorikov commented
Yes, looks good. Feel free to submit a PR please.