GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Simple.Data/Simple.Data.SqlServer/SqlDbTypeEx.cs at master · ThatRendle/Simple.Data Expand file tree/ Copy pathSqlDbTypeEx.csMore file actions 51 lines (49 loc) · 4.04 KB / Copy pathSqlDbTypeEx.csFile metadata and controls51 lines (49 loc) · 4.04 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Simple.Data.SqlServer { using System.Data; static class SqlDbTypeEx { private static readonly Dictionary<SqlDbType, Type> Map = new Dictionary<SqlDbType, Type> { { SqlDbType.BigInt, typeof(long)}, { SqlDbType.Binary, typeof(byte[]) }, { SqlDbType.Bit, typeof(bool)}, { SqlDbType.Char, typeof(string)}, { SqlDbType.Date, typeof(DateTime)}, { SqlDbType.DateTime, typeof(DateTime)}, { SqlDbType.DateTime2, typeof(DateTime)}, { SqlDbType.DateTimeOffset, typeof(DateTimeOffset)}, { SqlDbType.Decimal, typeof(decimal)}, { SqlDbType.Float, typeof(double)}, { SqlDbType.Image, typeof(byte[])}, { SqlDbType.Int, typeof(int)}, { SqlDbType.Money, typeof(decimal) }, {SqlDbType.NChar, typeof(string)}, { SqlDbType.NText, typeof(string)}, { SqlDbType.NVarChar, typeof(string)}, { SqlDbType.Real, typeof(Single)}, { SqlDbType.SmallDateTime, typeof(DateTime)}, { SqlDbType.SmallInt, typeof(short)}, { SqlDbType.SmallMoney, typeof(decimal)}, { SqlDbType.Structured, typeof(object)}, { SqlDbType.Text, typeof(string)}, { SqlDbType.Time, typeof(TimeSpan)}, { SqlDbType.Timestamp, typeof(byte[])}, { SqlDbType.TinyInt, typeof(byte)}, { SqlDbType.Udt, typeof(object)}, { SqlDbType.UniqueIdentifier, typeof(Guid)}, { SqlDbType.VarBinary, typeof(byte[])}, { SqlDbType.VarChar, typeof(string)}, { SqlDbType.Variant, typeof(object)}, { SqlDbType.Xml, typeof(string)} }; public static Type ToClrType(this SqlDbType sqlDbType) { return Map[sqlDbType]; } } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |