andrasfuchs / MrKupido

Mr. Kupido - recipes, ingredients, diets
http://www.mrkupido.com
0 stars 0 forks source link

Convert units and amounts to a more human-friendly form #138

Closed andrasfuchs closed 11 years ago

andrasfuchs commented 11 years ago

There are cases when the amount and the unit of the ingredient don't match. E.g. 12 csipet. In those cases we should do an automatic conversion between the units following a predetermined rule (or set of rules).

This should be done by business logic extension in the ToString method of the ingredient and by adding an attribute to the measurement unit itself to define the rules to follow.