d37eb0e90a4ed8a325d9bcfdd78f4ee77c8c694f
API/CodeSamples/1-Million-Record-View.md
| ... | ... | @@ -4,6 +4,22 @@ |
| 4 | 4 | |
| 5 | 5 | Below is the SQL sample to create a View with 1 million records using the Northwind example database. This query can be used to load test your application with before you send it out to production. |
| 6 | 6 | |
| 7 | + |
|
| 8 | +## What To Change |
|
| 9 | + |
|
| 10 | + |
|
| 11 | +'''C# |
|
| 12 | +DECIMAL(18,6) to NUMERIC(22,8): |
|
| 13 | +List<KeyValuePair<string, string>> typeOverrides = AdHocContext.Driver.NativeTypesOverrides; |
|
| 14 | +for (int i = 0; i < typeOverrides.Count; i++) |
|
| 15 | + if (typeOverrides[i].Key == "Decimal") |
|
| 16 | + { |
|
| 17 | + typeOverrides[i] = new KeyValuePair<string, string>(typeOverrides[i].Key, "NUMERIC(22,8)"); |
|
| 18 | + break; |
|
| 19 | + } |
|
| 20 | +AdHocContext.Driver.NativeTypesOverrides = typeOverrides; |
|
| 21 | +... |
|
| 22 | + |
|
| 7 | 23 | ##SQL Server |
| 8 | 24 | |
| 9 | 25 | ```sql |