Percentage properties in MVC 3

前端 未结 3 1190
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-08 19:56

My application has many models, many of which contain percentage data. These are represented as decimal or decimal? structs in the model. However, not

3条回答
  •  深忆病人
    2021-02-08 20:49

    Instead of representing your percentage properties using decimal primitives (see Primitive Obsession), why don't you create a Percentage type to wrap your desired functionality? You should have much more flexibility doing it that way...

提交回复
热议问题