Skip to content

Need help to improve an implementation #534

Answered by hankovich
raanam asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, you can use something like

return ResolveEntityAFromDb(request.AId, token)
    .Bind(result1 => ResolveEntityBFromDb(request.BId, token).Map(result2 => (result1, result2))
    .Map(tuple => Map(tuple.result1, tuple.result2, request))
    .Tap(() => dbContext.SaveChanges());

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@hankovich
Comment options

@raanam
Comment options

Answer selected by raanam
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants