Click here to Skip to main content
15,500,452 members

Comments by agolddog (Top 2 by date)

agolddog 26-Feb-20 10:18am View     CRLF
Wow, thanks for the quick responses. But, as I said, not really a programming question; sure, we could use Tuples, or a dedicated object as F_ES Sitecore mentions. The latter is the refactoring I tend toward, as it gives better context for the pieces of data than a Tuple solution. The real question is, how much should the use of out variables bother me. It really grinds my gears, but I'm not sure if I'm overblowing the situation.
agolddog 28-Oct-19 10:36am View     CRLF
I think I have to go with ZurdoDev and the the others. Your interaction will only produce one of two things: success or an exception. If there's no exception, you have all the values you came with. Use one of the things you've already discovered to retrieve the new id, and create some object to return (instead of void), building that object from the input + the new id. If there's an exception, you want to handle that in whatever way is appropriate for this layer of your system (I'd guess just let it bubble up, unless you have logging at this level). One minor thing is your method name is misspelled: addSession.