Revision history [back]

click to hide/show revision 1
initial version

answered 2015-09-21 08:37:03 +0800

chillworld gravatar image chillworld flag of Belgium

https://github.com/chillw...

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.

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.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More