Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
malakai521
· 1y ago · 0 comments
`var post = await _postService.getById(id);`
the F# equivalent is
`let! post = _postService.getById id`
Comments
[–]
alternatex
1y ago
You're missing the task {} block
[–]
neonsunset
1y ago
This assumes the context is already a task computation expression, which is what you'd have in asynchronous code.
[–]
sWW26
1y ago
and the C# is missing the `async Task` boilerplate