0
|
1 using System;
|
|
2 using System.Linq;
|
|
3 using BLToolkit.Data;
|
|
4 using BLToolkit.Data.DataProvider;
|
|
5
|
|
6 using NUnit.Framework;
|
|
7
|
|
8 namespace Data.Linq.Exceptions
|
|
9 {
|
|
10 using Model;
|
|
11
|
|
12 [TestFixture]
|
|
13 public class DataExceptionTest
|
|
14 {
|
|
15 [Test]
|
|
16 public void ParameterPrefixTest()
|
|
17 {
|
|
18 try
|
|
19 {
|
|
20 using (var db = new DbManager(new MySqlDataProvider(), "Server=DBHost;Port=3306;Database=nodatabase;Uid=bltoolkit;Pwd=TestPassword;"))
|
|
21 {
|
|
22 db.GetTable<Person>().ToList();
|
|
23 }
|
|
24 }
|
|
25 catch (DataException ex)
|
|
26 {
|
|
27 var number = ex.Number;
|
|
28 }
|
|
29 }
|
|
30 }
|
|
31 }
|