Using SQL tinyint columns

Note to self: When using (sql) tinyint columns and doing something like this:

DataSet ds = GetDataSetFromStoredProc("stored_proc_name", new SqlParameter("@parameter_name", value_id));

var retItems = from dstable in ds.Tables[0].AsEnumerable()
                select new ClassThing()
                {
                    PrimaryKeyId = dstable.Field<int>("some_column_name")
                };

the correct type to cast to is 'byte'. Byte is apparently an 8-bit unsigned integer, which is just perfect.

For future reference, it turns out there is a very handy SQL to CLR data type map available on MSDN.