Enums or Tables?

后端 未结 9 931
天命终不由人
天命终不由人 2021-02-06 08:38

I am making this a community wiki, as I would appreciate people\'s approach and not necessarily an answer.

I am in the situation where I have a lot of lookup type data

9条回答
  •  说谎
    说谎 (楼主)
    2021-02-06 09:11

    Use both enum(for code) and DB texts- for GUI presentation.

    So, if you will always have 3 option use an enum LowSalary, MiddleSalary and HighSalary, store your texts in the DB and switch your texts in the GUI corresponding to your property enum value.

提交回复
热议问题