-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
Why don't you create a enum?
Define in the enum all the different possibilities.
you can even save the enum value in the DB, so when you load yoru data, you just need to get the style from the enum.
The thing what change is when you save the data, you need to check what enum value it will be.
Like this, lesser check in the viewmodels (most of time) but you have to adapt your model and service.
Chill.
2 | No.2 Revision |
Why don't you create a enum?
Define in the enum all the different possibilities.
you can even save the enum value in the DB, so when you load yoru your data, you just need to get the style from the enum.
The thing what change is when you save the data, you need to check what enum value it will be.
Like this, lesser check in the viewmodels (most of time) but you have to adapt your model and service.
Chill.