Skip to content
Discussion options

You must be logged in to vote

they are using "exceptions" for normal program flow.

ObjectDatabase has an Exists method, you should be checking that in your program flow rather than relying on an exception being thrown. If you want a single call that checks and returns a sentinel value in the case that the ID doesn't exist, you can write an extension method.

Replies: 3 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jnm2
Comment options

jnm2 Apr 6, 2022
Collaborator

@Richiban
Comment options

@CyrusNajmabadi
Comment options

@Richiban
Comment options

@jnm2
Comment options

jnm2 Apr 6, 2022
Collaborator

Comment options

You must be logged in to vote
8 replies
@jnm2
Comment options

jnm2 Apr 6, 2022
Collaborator

@FaustVX
Comment options

@jnm2
Comment options

jnm2 Apr 6, 2022
Collaborator

@najak3d
Comment options

@CyrusNajmabadi
Comment options

Answer selected by najak3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
7 participants