Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNathan Yebgui
15,732 PointsDecimal Precision Attribute Annotation?
Q1) Can i change the precision of a decimal with an annotation? Also, is there any particular reason why we're using the type decimal instead of float or double?
Q2) If i specify the Table name with an annotation without removing the pluralizing convention will EF still pluralize it?
TIA
- great course btw.
1 Answer
Steven Parker
231,275 PointsI'm not aware of an annotation for decimal precision. But decimals are more precise than other floating point types and are particularly suited for financial values.
I don't believe it makes a difference in regard to pluralizing if the name comes from an annotation or not, but it might be worth doing a little experiment to confirm.
Nathan Yebgui
15,732 PointsNathan Yebgui
15,732 Pointsi checked using the table annotation and EF didn't pluralize the table name.
Steven Parker
231,275 PointsSteven Parker
231,275 PointsGood to know!