locked
Developing in C# best practice question. RRS feed

  • Question

  • I think for most people adding opportunities products one at a time is very time consuming and not efficient. I've have a plugin that runs off a drop down option list and creates all products related to that "package" option to save our sales team time.

    I am going to be greatly expanding this out and I just had a question on what the best practice would be in this situation and I'll explain the two options I'm looking at.

    Option 1 - I declare each individual product and then I'll do if statements so if option list x is selected i'll just have a series of  "service.Create(x); service.Create(y); etc. I see this as it would save me a lot of coding but it would take some more computing power.

    Option 2 - I only declare the products needed under each if statement. So the plugin wouldn't have to run through declaring every product. It would save some computing power I think but be a lot more coding, since a product can belong to more than one "package".

    Does that make sense? Does declaring all those "entities" as a product really take up much computing power, preferable I'd like to save myself a lot of coding but I don't want it to run inefficiently.

    Thanks in advance!

    Friday, March 28, 2014 2:57 PM