Hi,
it looks like there are quite a few discussions on the internet regarding what data types to use in regards to Int32 or Int16..
According to the below reference, the runtime optimizes performance of Int32 and recommends them for counters and other frequently accessed operations.
From the book: MCTS Self-Paced Training Kit (Exam 70-536): Microsoft® .NET Framework 2.0—Application Development Foundation
Chapter 1: "Framework Fundamentals"
Lesson 1: "Using Value Types"
Best Practices: Optimizing performance with built-in types
The runtime optimizes the performance of 32-bit integer types (Int32 and UInt32), so use those types for counters and other frequently accessed integral variables.
For floating-point operations, Double is the most efficient type because those operations are optimized by hardware.
Also, Table 1-1 in the same section lists recommended uses for each type. Relevant to this discussion:
* Int16 - Interoperation and other specialized uses
* Int32 - Whole numbers and counters
* Int64 - Large whole numbers
http://stackoverflow.com/questions/129023/-net-integer-vs-int16
This might be true but on the database level it's a different thing as it would take more space to have a million times an int rather than a smallint.
But if we do it on the database LLBLGen passes it right along to the code and we have Int16 in our entities....
Just wanted to see what your opinion on it is?
Thanks
patrick