Frage

This might be confusing question but I don't know which is the better way to ask my question. I am developing a software which has predefined data/logic in some scenario. For example:

  1. For mails, there are predefined list of email addresses to send in CC or BCC.
  2. For using specific kind of email template in specific scenario is fixed on predefined condition.

I want to manage this kind of predefined logic/data separated in my project. So if there is any change in that data, I can easily change it from single place. For that I have many ideas in my mind. Suggest me which would be better. And if you have any other idea please share with me.

  1. Make a class & store predefined data in variables. or use methods for logic.
  2. Define all predefined data in web.config
War es hilfreich?

Lösung

For emails you can have groups /ids for scenarios and map those ids in database.Then at runtime just pick cc and bcc ids from database. If database is much of overhead , store them in some xml file .This way any change would be required in database only and code wont require much change.Same goes for email template.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top