GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Simple.Data/Simple.Data.SqlServer/DbTypeLookup.cs at master · ThatRendle/Simple.Data

Expand file tree

/

DbTypeLookup.cs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
55 lines (53 loc) · 4.75 KB
/

DbTypeLookup.cs

Copy path

File metadata and controls

55 lines (53 loc) · 4.75 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
52
53
54
55
namespace Simple.Data.SqlServer
{
using System.Collections.Generic;
using System.Data;
internal static class DbTypeLookup
{
private static readonly Dictionary<string, SqlDbType> SqlDbTypeLookup = new Dictionary<string, SqlDbType>
{
{"text", SqlDbType.Text},
{"uniqueidentifier", SqlDbType.UniqueIdentifier},
{"date", SqlDbType.Date},
{"time", SqlDbType.Time},
#if(!MONO)
{"datetime2", SqlDbType.DateTime2},
{
"datetimeoffset",
SqlDbType.DateTimeOffset
},
#endif
{"tinyint", SqlDbType.TinyInt},
{"smallint", SqlDbType.SmallInt},
{"int", SqlDbType.Int},
{"smalldatetime", SqlDbType.SmallDateTime},
{"real", SqlDbType.Real},
{"money", SqlDbType.Money},
{"datetime", SqlDbType.DateTime},
{"float", SqlDbType.Float},
{"sql_variant", SqlDbType.Variant},
{"ntext", SqlDbType.NText},
{"bit", SqlDbType.Bit},
{"decimal", SqlDbType.Decimal},
{"numeric", SqlDbType.Decimal},
{"smallmoney", SqlDbType.SmallMoney},
{"bigint", SqlDbType.BigInt},
{"varbinary", SqlDbType.VarBinary},
{"varchar", SqlDbType.VarChar},
{"binary", SqlDbType.Binary},
{"char", SqlDbType.Char},
{"timestamp", SqlDbType.Timestamp},
{"nvarchar", SqlDbType.NVarChar},
{"nchar", SqlDbType.NChar},
{"xml", SqlDbType.Xml},
{"image", SqlDbType.Image},
{"geography", SqlDbType.Udt},
{"geometry", SqlDbType.Udt},
{"hierarchyid", SqlDbType.Udt},
};
public static SqlDbType GetSqlDbType(string typeName)
{
return SqlDbTypeLookup[typeName];
}
}
}
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.