Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Result.requireTrue to take second parameter as a function #105

Closed
sandeepc24 opened this issue Nov 1, 2020 · 1 comment
Closed

Add Result.requireTrue to take second parameter as a function #105

sandeepc24 opened this issue Nov 1, 2020 · 1 comment

Comments

@sandeepc24
Copy link

Currently Result.requireTrue takes second parameter as a value, would it make sense to add an overloaded version or new extension method to allow it to take a function. This can be used in following scenarios

let trn = con.BeginTransaction()
let! result = cmd.AsyncExecute() |> Result.requireEqualTo 1 (fun x -> trn.Rollback(); "Error executing.")
trn.Commit()
@sandeepc24
Copy link
Author

I think I need to use teeError.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant