├── Dapper ├── Dapper.BLL │ ├── BookBLL.cs │ ├── BookReviewBLL.cs │ ├── Dapper.BLL.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.BLL.dll │ │ │ ├── Dapper.BLL.pdb │ │ │ ├── Dapper.Factory.dll │ │ │ ├── Dapper.Factory.pdb │ │ │ ├── Dapper.IBLL.dll │ │ │ ├── Dapper.IBLL.pdb │ │ │ ├── Dapper.IDAL.dll │ │ │ ├── Dapper.IDAL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.BLL.csproj.FileListAbsolute.txt │ │ ├── Dapper.BLL.csprojResolveAssemblyReference.cache │ │ ├── Dapper.BLL.dll │ │ ├── Dapper.BLL.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.Console │ ├── App.config │ ├── Dapper.Console.csproj │ ├── Dapper.Console.idc │ ├── Program.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.BLL.dll │ │ │ ├── Dapper.BLL.pdb │ │ │ ├── Dapper.Console.exe │ │ │ ├── Dapper.Console.exe.config │ │ │ ├── Dapper.Console.pdb │ │ │ ├── Dapper.Console.vshost.exe │ │ │ ├── Dapper.Console.vshost.exe.config │ │ │ ├── Dapper.Console.vshost.exe.manifest │ │ │ ├── Dapper.Factory.dll │ │ │ ├── Dapper.Factory.pdb │ │ │ ├── Dapper.IBLL.dll │ │ │ ├── Dapper.IBLL.pdb │ │ │ ├── Dapper.IDAL.dll │ │ │ ├── Dapper.IDAL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── Dapper.SQLServerDAL.dll │ │ │ ├── Dapper.SQLServerDAL.pdb │ │ │ ├── Dapper.dll │ │ │ ├── Dapper.pdb │ │ │ ├── Dapper.xml │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.Console.csproj.FileListAbsolute.txt │ │ ├── Dapper.Console.csprojResolveAssemblyReference.cache │ │ ├── Dapper.Console.exe │ │ ├── Dapper.Console.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.Factory │ ├── ConnectionFactory.cs │ ├── DALFactory.cs │ ├── Dapper.Factory.csproj │ ├── Dapper.Factory.csproj.user │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.Factory.dll │ │ │ ├── Dapper.Factory.pdb │ │ │ ├── Dapper.IDAL.dll │ │ │ ├── Dapper.IDAL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.Factory.csproj.FileListAbsolute.txt │ │ ├── Dapper.Factory.csprojResolveAssemblyReference.cache │ │ ├── Dapper.Factory.dll │ │ ├── Dapper.Factory.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.IBLL │ ├── ClassDiagram1.cd │ ├── Dapper.IBLL.csproj │ ├── IBookBLL.cs │ ├── IBookReviewBLL.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.IBLL.dll │ │ │ ├── Dapper.IBLL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.IBLL.csproj.FileListAbsolute.txt │ │ ├── Dapper.IBLL.csprojResolveAssemblyReference.cache │ │ ├── Dapper.IBLL.dll │ │ ├── Dapper.IBLL.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.IDAL │ ├── Dapper.IDAL.csproj │ ├── Dapper.IDAL.csproj.user │ ├── IBookDAL.cs │ ├── IBookReviewDAL.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.IDAL.dll │ │ │ ├── Dapper.IDAL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.IDAL.csproj.FileListAbsolute.txt │ │ ├── Dapper.IDAL.csprojResolveAssemblyReference.cache │ │ ├── Dapper.IDAL.dll │ │ ├── Dapper.IDAL.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.Model │ ├── Book.cs │ ├── BookReview.cs │ ├── Dapper.Model.csproj │ ├── Dapper.Model.csproj.user │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.Model.csproj.FileListAbsolute.txt │ │ ├── Dapper.Model.csprojResolveAssemblyReference.cache │ │ ├── Dapper.Model.dll │ │ ├── Dapper.Model.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.SQLServerDAL │ ├── BookDAL.cs │ ├── BookReviewDAL.cs │ ├── Dapper.SQLServerDAL.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.Factory.dll │ │ │ ├── Dapper.Factory.pdb │ │ │ ├── Dapper.IDAL.dll │ │ │ ├── Dapper.IDAL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── Dapper.SQLServerDAL.dll │ │ │ ├── Dapper.SQLServerDAL.pdb │ │ │ ├── Dapper.dll │ │ │ ├── Dapper.pdb │ │ │ ├── Dapper.xml │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ ├── obj │ │ └── Debug │ │ │ ├── Dapper.SQLServerDAL.csproj.FileListAbsolute.txt │ │ │ ├── Dapper.SQLServerDAL.csprojResolveAssemblyReference.cache │ │ │ ├── Dapper.SQLServerDAL.dll │ │ │ ├── Dapper.SQLServerDAL.pdb │ │ │ └── DesignTimeResolveAssemblyReferencesInput.cache │ └── packages.config ├── Dapper.Test │ ├── App.config │ ├── BookDALTest.cs │ ├── ClassDiagram1.cd │ ├── Dapper.Test.csproj │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Dapper.Factory.dll │ │ │ ├── Dapper.Factory.pdb │ │ │ ├── Dapper.IDAL.dll │ │ │ ├── Dapper.IDAL.pdb │ │ │ ├── Dapper.Model.dll │ │ │ ├── Dapper.Model.pdb │ │ │ ├── Dapper.SQLServerDAL.dll │ │ │ ├── Dapper.SQLServerDAL.pdb │ │ │ ├── Dapper.Test.dll │ │ │ ├── Dapper.Test.dll.config │ │ │ ├── Dapper.Test.pdb │ │ │ ├── Dapper.dll │ │ │ ├── DapperExtensions.dll │ │ │ └── DapperExtensions.pdb │ └── obj │ │ └── Debug │ │ ├── Dapper.Test.csproj.FileListAbsolute.txt │ │ ├── Dapper.Test.csprojResolveAssemblyReference.cache │ │ ├── Dapper.Test.dll │ │ ├── Dapper.Test.pdb │ │ └── DesignTimeResolveAssemblyReferencesInput.cache ├── Dapper.sln ├── Dapper.v11.suo ├── TestResults │ ├── Dapper.TE.Tests.mdf │ └── Dapper.TE.Tests_log.ldf └── packages │ ├── Dapper.1.12.1 │ ├── Dapper.1.12.1.nupkg │ └── lib │ │ ├── net35 │ │ ├── Dapper.dll │ │ ├── Dapper.pdb │ │ └── Dapper.xml │ │ └── net40 │ │ ├── Dapper.dll │ │ ├── Dapper.pdb │ │ └── Dapper.xml │ ├── DapperExtensions.1.4.4 │ ├── DapperExtensions.1.4.4.nupkg │ └── lib │ │ └── net40 │ │ ├── DapperExtensions.dll │ │ └── DapperExtensions.pdb │ └── repositories.config └── README.md /Dapper/Dapper.BLL/BookBLL.cs: -------------------------------------------------------------------------------- 1 | using Dapper.IBLL; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using Dapper.Model; 7 | using Dapper.IDAL; 8 | using Dapper.Factory; 9 | 10 | /* 11 | * create by Mao Qingyu 12 | */ 13 | 14 | namespace Dapper.BLL 15 | { 16 | public class BookBLL : IBookBLL 17 | { 18 | private static readonly IBookDAL dal = DALFactory.CreateBookDAL(); 19 | 20 | public bool Insert(Book book) 21 | { 22 | return dal.Insert(book) > 0 ? true : false; 23 | } 24 | 25 | public bool Update(Book book) 26 | { 27 | return dal.Update(book) > 0 ? true : false; 28 | } 29 | 30 | public bool Delete(Book book) 31 | { 32 | return dal.Delete(book) > 0 ? true : false; 33 | } 34 | 35 | public bool Delete(string id) 36 | { 37 | return dal.Delete(id) > 0 ? true : false; 38 | } 39 | 40 | public IList GetBookList() 41 | { 42 | return dal.GetList(); 43 | } 44 | 45 | public Book GetEntity(string id) 46 | { 47 | return dal.GetEntity(id); 48 | } 49 | 50 | public Book GetEntityWithRefence(string id) 51 | { 52 | return dal.GetEntityWithRefence(id); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/BookReviewBLL.cs: -------------------------------------------------------------------------------- 1 | using Dapper.IBLL; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using Dapper.Model; 7 | using Dapper.Factory; 8 | using Dapper.IDAL; 9 | 10 | /* 11 | * create by Mao Qingyu 12 | */ 13 | 14 | namespace Dapper.BLL 15 | { 16 | public class BookReviewBLL:IBookReviewBLL 17 | { 18 | private static readonly IBookReviewDAL dal = DALFactory.CreateBookReviewDAL(); 19 | 20 | public bool Insert(BookReview bookReview) 21 | { 22 | return dal.Insert(bookReview) > 0 ? true : false; 23 | } 24 | 25 | public bool Update(BookReview bookReview) 26 | { 27 | return dal.Update(bookReview) > 0 ? true : false; 28 | } 29 | 30 | public bool Delete(BookReview bookReview) 31 | { 32 | return dal.Delete(bookReview) > 0 ? true : false; 33 | } 34 | 35 | public bool Delete(string id) 36 | { 37 | return dal.Delete(id) > 0 ? true : false; 38 | } 39 | 40 | public IList GetList() 41 | { 42 | return dal.GetList(); 43 | } 44 | 45 | public BookReview GetEntity(string id) 46 | { 47 | return dal.GetEntity(id); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/Dapper.BLL.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {CE980EE9-F104-448E-8698-8D6721B838DD} 8 | Library 9 | Properties 10 | Dapper.BLL 11 | Dapper.BLL 12 | v4.0 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | {7e9067d2-1ecd-4c29-9b0e-97de6285188e} 49 | Dapper.Factory 50 | 51 | 52 | {a57f9509-9d72-4826-b69b-e71e51bc141e} 53 | Dapper.IBLL 54 | 55 | 56 | {33f17117-1bc9-416f-bfed-70393c8dae54} 57 | Dapper.IDAL 58 | 59 | 60 | {df4d28f8-8ec5-436a-8aba-ab52875dfcb3} 61 | Dapper.Model 62 | 63 | 64 | 65 | 72 | -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.BLL")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.BLL")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("1a047dd8-d883-41f8-bd7b-53ea0d566c3f")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.BLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.BLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.Factory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.Factory.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.Factory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.Factory.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.IBLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.IBLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.IBLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.IBLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.BLL.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.BLL.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.Factory.dll 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.IBLL.dll 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.IDAL.dll 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.Model.dll 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.Factory.pdb 8 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.IBLL.pdb 9 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.IDAL.pdb 10 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\bin\Debug\Dapper.Model.pdb 11 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\obj\Debug\Dapper.BLL.csprojResolveAssemblyReference.cache 12 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\obj\Debug\Dapper.BLL.dll 13 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.BLL\obj\Debug\Dapper.BLL.pdb 14 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.BLL.dll 15 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.BLL.pdb 16 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.Factory.dll 17 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.IBLL.dll 18 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.IDAL.dll 19 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.Model.dll 20 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\DapperExtensions.dll 21 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.Factory.pdb 22 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.IBLL.pdb 23 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.IDAL.pdb 24 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\Dapper.Model.pdb 25 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\bin\Debug\DapperExtensions.pdb 26 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\obj\Debug\Dapper.BLL.csprojResolveAssemblyReference.cache 27 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\obj\Debug\Dapper.BLL.dll 28 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.BLL\obj\Debug\Dapper.BLL.pdb 29 | -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/obj/Debug/Dapper.BLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.BLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.BLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Console/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/Dapper.Console.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {7BA315E4-1DAD-44AF-B026-51478A1BDDD3} 8 | Exe 9 | Properties 10 | Dapper.Console 11 | Dapper.Console 12 | v4.0 13 | 512 14 | 15 | 16 | AnyCPU 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | AnyCPU 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | 34 | 35 | 36 | False 37 | ..\packages\DapperExtensions.1.4.4\lib\net40\DapperExtensions.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | {ce980ee9-f104-448e-8698-8d6721b838dd} 57 | Dapper.BLL 58 | 59 | 60 | {7e9067d2-1ecd-4c29-9b0e-97de6285188e} 61 | Dapper.Factory 62 | 63 | 64 | {a57f9509-9d72-4826-b69b-e71e51bc141e} 65 | Dapper.IBLL 66 | 67 | 68 | {33f17117-1bc9-416f-bfed-70393c8dae54} 69 | Dapper.IDAL 70 | 71 | 72 | {df4d28f8-8ec5-436a-8aba-ab52875dfcb3} 73 | Dapper.Model 74 | 75 | 76 | {3651cb78-6f6e-4176-be83-b98ccc28c72d} 77 | Dapper.SQLServerDAL 78 | 79 | 80 | 81 | 88 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/Dapper.Console.idc: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Dapper.Factory; 6 | using Dapper.IDAL; 7 | using Dapper.Model; 8 | using Dapper.IBLL; 9 | using Dapper.BLL; 10 | using DapperExtensions.Mapper; 11 | 12 | namespace Dapper.Console 13 | { 14 | public class Program 15 | { 16 | static void Main(string[] args) 17 | { 18 | IBookBLL bll = new BookBLL(); 19 | var list = bll.GetBookList(); 20 | foreach (var item in list) 21 | { 22 | System.Console.WriteLine(item); 23 | } 24 | System.Console.WriteLine(bll.GetEntity("27")); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.Console")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.Console")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("efbbb0c8-4e0f-4716-8406-4ed6f114f21d")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.BLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.BLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.BLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.BLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Console.exe -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Console.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Console.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Console.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Console.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Console.vshost.exe -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Console.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Console.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Factory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Factory.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Factory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Factory.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.IBLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.IBLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.IBLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.IBLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.SQLServerDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.SQLServerDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.SQLServerDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.SQLServerDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/Dapper.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/Dapper.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Console/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/obj/Debug/Dapper.Console.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Console.exe.config 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Console.exe 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Console.pdb 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\obj\Debug\Dapper.Console.exe 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\obj\Debug\Dapper.Console.pdb 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Factory.dll 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.IDAL.dll 8 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Model.dll 9 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.SQLServerDAL.dll 10 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.dll 11 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Factory.pdb 12 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.IDAL.pdb 13 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.Model.pdb 14 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.SQLServerDAL.pdb 15 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.pdb 16 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.xml 17 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\obj\Debug\Dapper.Console.csprojResolveAssemblyReference.cache 18 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.BLL.dll 19 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.IBLL.dll 20 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.BLL.pdb 21 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Console\bin\Debug\Dapper.IBLL.pdb 22 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Console.exe.config 23 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Console.exe 24 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Console.pdb 25 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.BLL.dll 26 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Factory.dll 27 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.IBLL.dll 28 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.IDAL.dll 29 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Model.dll 30 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.SQLServerDAL.dll 31 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\DapperExtensions.dll 32 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.BLL.pdb 33 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Factory.pdb 34 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.IBLL.pdb 35 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.IDAL.pdb 36 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.Model.pdb 37 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\Dapper.SQLServerDAL.pdb 38 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\bin\Debug\DapperExtensions.pdb 39 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\obj\Debug\Dapper.Console.csprojResolveAssemblyReference.cache 40 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\obj\Debug\Dapper.Console.exe 41 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Console\obj\Debug\Dapper.Console.pdb 42 | -------------------------------------------------------------------------------- /Dapper/Dapper.Console/obj/Debug/Dapper.Console.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/obj/Debug/Dapper.Console.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Console/obj/Debug/Dapper.Console.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/obj/Debug/Dapper.Console.exe -------------------------------------------------------------------------------- /Dapper/Dapper.Console/obj/Debug/Dapper.Console.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/obj/Debug/Dapper.Console.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Console/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Console/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/ConnectionFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Configuration; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Data; 7 | using System.Reflection; 8 | using MySql.Data.MySqlClient; 9 | using System.Data.SqlClient; 10 | 11 | /* 12 | * create by Mao Qingyu 13 | */ 14 | 15 | namespace Dapper.Factory 16 | { 17 | /// 18 | /// Connection工厂用于实例化对应的IDbConnection对象,传递给Dapper。 19 | /// 20 | public class ConnectionFactory 21 | { 22 | private static readonly string connectionName = ConfigurationManager.AppSettings["ConnectionName"]; 23 | private static readonly string connString = ConfigurationManager.ConnectionStrings["Database"].ConnectionString; 24 | 25 | public static IDbConnection CreateConnection() 26 | { 27 | IDbConnection conn = null; 28 | switch (connectionName) 29 | { 30 | case "SQLServer": 31 | conn = new SqlConnection(connString); 32 | break; 33 | case "MySQL": 34 | conn = new MySqlConnection(connString); 35 | break; 36 | default: 37 | conn = new SqlConnection(connString); 38 | break; 39 | } 40 | conn.Open(); 41 | return conn; 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/DALFactory.cs: -------------------------------------------------------------------------------- 1 | using Dapper.IDAL; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Configuration; 5 | using System.Linq; 6 | using System.Reflection; 7 | using System.Text; 8 | 9 | /* 10 | * create by Mao Qingyu 11 | */ 12 | 13 | namespace Dapper.Factory 14 | { 15 | /// 16 | /// DAL工厂,读取App.config的配置文件实例化相应的DAL对象 17 | /// 18 | public class DALFactory 19 | { 20 | private static readonly string path = ConfigurationManager.AppSettings["ConsoleDAL"]; 21 | 22 | public DALFactory() { } 23 | 24 | public static IBookDAL CreateBookDAL() 25 | { 26 | string className = path + ".BookDAL"; 27 | return (IBookDAL)Assembly.Load(path).CreateInstance(className); 28 | } 29 | 30 | public static IBookReviewDAL CreateBookReviewDAL() 31 | { 32 | string className = path + ".BookReviewDAL"; 33 | return (IBookReviewDAL)Assembly.Load(path).CreateInstance(className); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/Dapper.Factory.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {7E9067D2-1ECD-4C29-9B0E-97DE6285188E} 8 | Library 9 | Properties 10 | Dapper.Factory 11 | Dapper.Factory 12 | v4.0 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | False 35 | C:\Program Files (x86)\MySQL\Connector NET 6.9.3\Assemblies\v4.0\MySql.Data.dll 36 | 37 | 38 | False 39 | C:\Program Files (x86)\MySQL\Connector NET 6.9.3\Assemblies\v4.0\MySql.Web.dll 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | {33f17117-1bc9-416f-bfed-70393c8dae54} 58 | Dapper.IDAL 59 | 60 | 61 | 62 | 69 | -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/Dapper.Factory.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ProjectFiles 5 | 6 | -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.Factory")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.Factory")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("2222321e-ca79-4672-9ba8-c275c87d5928")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/Dapper.Factory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/Dapper.Factory.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/Dapper.Factory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/Dapper.Factory.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\bin\Debug\Dapper.Factory.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\bin\Debug\Dapper.Factory.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\bin\Debug\Dapper.IDAL.dll 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\bin\Debug\Dapper.Model.dll 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\bin\Debug\Dapper.IDAL.pdb 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\bin\Debug\Dapper.Model.pdb 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\obj\Debug\Dapper.Factory.csprojResolveAssemblyReference.cache 8 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\obj\Debug\Dapper.Factory.dll 9 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Factory\obj\Debug\Dapper.Factory.pdb 10 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\Dapper.Factory.dll 11 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\Dapper.Factory.pdb 12 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\Dapper.IDAL.dll 13 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\Dapper.Model.dll 14 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\DapperExtensions.dll 15 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\Dapper.IDAL.pdb 16 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\Dapper.Model.pdb 17 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\bin\Debug\DapperExtensions.pdb 18 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\obj\Debug\Dapper.Factory.csprojResolveAssemblyReference.cache 19 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\obj\Debug\Dapper.Factory.dll 20 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Factory\obj\Debug\Dapper.Factory.pdb 21 | -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/obj/Debug/Dapper.Factory.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Factory/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/Dapper.IBLL.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {A57F9509-9D72-4826-B69B-E71E51BC141E} 8 | Library 9 | Properties 10 | Dapper.IBLL 11 | Dapper.IBLL 12 | v4.0 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | {df4d28f8-8ec5-436a-8aba-ab52875dfcb3} 49 | Dapper.Model 50 | 51 | 52 | 53 | 60 | -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/IBookBLL.cs: -------------------------------------------------------------------------------- 1 | using Dapper.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | /* 8 | * create by Mao Qingyu 9 | */ 10 | 11 | namespace Dapper.IBLL 12 | { 13 | public interface IBookBLL 14 | { 15 | #region CRUD 16 | 17 | bool Insert(Book book); 18 | 19 | bool Update(Book book); 20 | 21 | bool Delete(Book book); 22 | 23 | bool Delete(string id); 24 | 25 | IList GetBookList(); 26 | 27 | Book GetEntity(string id); 28 | 29 | Book GetEntityWithRefence(string id); 30 | 31 | #endregion 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/IBookReviewBLL.cs: -------------------------------------------------------------------------------- 1 | using Dapper.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | /* 8 | * create by Mao Qingyu 9 | */ 10 | 11 | namespace Dapper.IBLL 12 | { 13 | public interface IBookReviewBLL 14 | { 15 | 16 | #region CRUD 17 | 18 | bool Insert(BookReview bookReview); 19 | 20 | bool Update(BookReview bookReview); 21 | 22 | bool Delete(BookReview bookReview); 23 | 24 | bool Delete(string id); 25 | 26 | IList GetList(); 27 | 28 | BookReview GetEntity(string id); 29 | 30 | #endregion 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.IBLL")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.IBLL")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("2325a37e-426f-4ed7-86f5-ada1b5451711")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/bin/Debug/Dapper.IBLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/bin/Debug/Dapper.IBLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/bin/Debug/Dapper.IBLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/bin/Debug/Dapper.IBLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\bin\Debug\Dapper.IBLL.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\bin\Debug\Dapper.IBLL.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\bin\Debug\Dapper.Model.dll 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\bin\Debug\Dapper.Model.pdb 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\obj\Debug\Dapper.IBLL.dll 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\obj\Debug\Dapper.IBLL.pdb 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IBLL\obj\Debug\Dapper.IBLL.csprojResolveAssemblyReference.cache 8 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\bin\Debug\Dapper.IBLL.dll 9 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\bin\Debug\Dapper.IBLL.pdb 10 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\bin\Debug\Dapper.Model.dll 11 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\bin\Debug\DapperExtensions.dll 12 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\bin\Debug\Dapper.Model.pdb 13 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\bin\Debug\DapperExtensions.pdb 14 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\obj\Debug\Dapper.IBLL.csprojResolveAssemblyReference.cache 15 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\obj\Debug\Dapper.IBLL.dll 16 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IBLL\obj\Debug\Dapper.IBLL.pdb 17 | -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/obj/Debug/Dapper.IBLL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IBLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IBLL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/Dapper.IDAL.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {33F17117-1BC9-416F-BFED-70393C8DAE54} 8 | Library 9 | Properties 10 | Dapper.IDAL 11 | Dapper.IDAL 12 | v4.0 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | {df4d28f8-8ec5-436a-8aba-ab52875dfcb3} 49 | Dapper.Model 50 | 51 | 52 | 53 | 60 | -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/Dapper.IDAL.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ProjectFiles 5 | 6 | -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/IBookDAL.cs: -------------------------------------------------------------------------------- 1 | using Dapper.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | /* 8 | * create by Mao Qingyu 9 | */ 10 | 11 | namespace Dapper.IDAL 12 | { 13 | public interface IBookDAL 14 | { 15 | #region CRUD 16 | 17 | int Insert(Book book); 18 | 19 | int Update(Book book); 20 | 21 | int Delete(Book book); 22 | 23 | int Delete(string id); 24 | 25 | IList GetList(); 26 | 27 | /// 28 | /// 根据主键获得Book 29 | /// 30 | /// 31 | /// 32 | Book GetEntity(string id); 33 | 34 | /// 35 | /// 根据主键获得Book包括BookReview 36 | /// 37 | /// 38 | /// 39 | Book GetEntityWithRefence(string id); 40 | 41 | #endregion 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/IBookReviewDAL.cs: -------------------------------------------------------------------------------- 1 | using Dapper.Model; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | /* 8 | * create by Mao Qingyu 9 | */ 10 | 11 | namespace Dapper.IDAL 12 | { 13 | public interface IBookReviewDAL 14 | { 15 | #region CRUD 16 | 17 | int Insert(BookReview bookReview); 18 | 19 | int Update(BookReview bookReview); 20 | 21 | int Delete(BookReview bookReview); 22 | 23 | int Delete(string id); 24 | 25 | IList GetList(); 26 | 27 | BookReview GetEntity(string id); 28 | 29 | #endregion 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.IDAL")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.IDAL")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("e8e2e214-9bc4-49ca-a876-05a72d2f3664")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/bin/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/bin/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/bin/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/bin/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\bin\Debug\Dapper.IDAL.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\bin\Debug\Dapper.IDAL.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\bin\Debug\Dapper.Model.dll 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\bin\Debug\Dapper.Model.pdb 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\obj\Debug\Dapper.IDAL.csprojResolveAssemblyReference.cache 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\obj\Debug\Dapper.IDAL.dll 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.IDAL\obj\Debug\Dapper.IDAL.pdb 8 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\bin\Debug\Dapper.IDAL.dll 9 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\bin\Debug\Dapper.IDAL.pdb 10 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\bin\Debug\Dapper.Model.dll 11 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\bin\Debug\DapperExtensions.dll 12 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\bin\Debug\Dapper.Model.pdb 13 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\bin\Debug\DapperExtensions.pdb 14 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\obj\Debug\Dapper.IDAL.csprojResolveAssemblyReference.cache 15 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\obj\Debug\Dapper.IDAL.dll 16 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.IDAL\obj\Debug\Dapper.IDAL.pdb 17 | -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/obj/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.IDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.IDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Model/Book.cs: -------------------------------------------------------------------------------- 1 | using DapperExtensions.Mapper; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | /* 8 | * create by Mao Qingyu 9 | */ 10 | 11 | namespace Dapper.Model 12 | { 13 | public class Book 14 | { 15 | public Book() 16 | { 17 | Reviews = new List(); 18 | } 19 | public int Id { get; set; } 20 | 21 | public string Name { get; set; } 22 | 23 | public virtual List Reviews { get; set; } 24 | 25 | public override string ToString() 26 | { 27 | return string.Format("[{0}]------《{1}》", Id, Name); 28 | } 29 | } 30 | 31 | public class BookMapper : ClassMapper 32 | { 33 | public BookMapper() 34 | { 35 | Table("Books"); 36 | Map(b => b.Reviews).Ignore(); 37 | AutoMap(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Dapper/Dapper.Model/BookReview.cs: -------------------------------------------------------------------------------- 1 | using DapperExtensions.Mapper; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | /* 8 | * create by Mao Qingyu 9 | */ 10 | 11 | namespace Dapper.Model 12 | { 13 | public class BookReview 14 | { 15 | public int Id { get; set; } 16 | 17 | public int BookId { get; set; } 18 | 19 | public virtual string Content { get; set; } 20 | 21 | public virtual Book AssoicationWithBook { get; set; } 22 | 23 | public override string ToString() 24 | { 25 | return string.Format("{0})--[{1}]\t\"{3}\"", Id, BookId, Content); 26 | } 27 | } 28 | 29 | public class BookReviewMapper : ClassMapper 30 | { 31 | public BookReviewMapper() 32 | { 33 | Table("BookReview"); 34 | Map(bp => bp.AssoicationWithBook).Ignore(); 35 | AutoMap(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Dapper/Dapper.Model/Dapper.Model.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3} 8 | Library 9 | Properties 10 | Dapper.Model 11 | Dapper.Model 12 | v4.0 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\DapperExtensions.1.4.4\lib\net40\DapperExtensions.dll 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 57 | -------------------------------------------------------------------------------- /Dapper/Dapper.Model/Dapper.Model.csproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ProjectFiles 5 | 6 | -------------------------------------------------------------------------------- /Dapper/Dapper.Model/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.Model")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.Model")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("00012c12-56ef-4cae-addb-8937c47a90fc")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.Model/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Model/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Model/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Model/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Model/obj/Debug/Dapper.Model.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Model\bin\Debug\Dapper.Model.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Model\bin\Debug\Dapper.Model.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Model\obj\Debug\Dapper.Model.dll 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Model\obj\Debug\Dapper.Model.pdb 5 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\bin\Debug\Dapper.Model.dll 6 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\bin\Debug\Dapper.Model.pdb 7 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\bin\Debug\DapperExtensions.dll 8 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\bin\Debug\DapperExtensions.pdb 9 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\obj\Debug\Dapper.Model.csprojResolveAssemblyReference.cache 10 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\obj\Debug\Dapper.Model.dll 11 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Model\obj\Debug\Dapper.Model.pdb 12 | -------------------------------------------------------------------------------- /Dapper/Dapper.Model/obj/Debug/Dapper.Model.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/obj/Debug/Dapper.Model.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Model/obj/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/obj/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Model/obj/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/obj/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Model/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/BookDAL.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Dapper.IDAL; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Linq; 6 | using System.Text; 7 | using Dapper.Factory; 8 | using System.Data; 9 | using Dapper.Model; 10 | using DapperExtensions; 11 | using DapperExtensions.Mapper; 12 | 13 | /* 14 | * create by Mao Qingyu 15 | */ 16 | 17 | namespace Dapper.SQLServerDAL 18 | { 19 | public class BookDAL : IBookDAL 20 | { 21 | private IDbConnection _conn; 22 | public IDbConnection Conn 23 | { 24 | get 25 | { 26 | return _conn = ConnectionFactory.CreateConnection(); 27 | } 28 | } 29 | 30 | #region CRUD using raw dapper 31 | 32 | public int Insert(Model.Book book) 33 | { 34 | using (Conn) 35 | { 36 | string query = "INSERT INTO Book(Name)VALUES(@name)"; 37 | return Conn.Execute(query, book); 38 | } 39 | } 40 | 41 | public int Update(Model.Book book) 42 | { 43 | using (Conn) 44 | { 45 | string query = "UPDATE Book SET Name=@name WHERE id =@id"; 46 | return Conn.Execute(query, book); 47 | } 48 | } 49 | 50 | public int Delete(Model.Book book) 51 | { 52 | using (Conn) 53 | { 54 | string query = "DELETE FROM Book WHERE id = @id"; 55 | return Conn.Execute(query, book); 56 | } 57 | } 58 | 59 | public int Delete(string id) 60 | { 61 | using (Conn) 62 | { 63 | string query = "DELETE FROM Book WHERE id = @id"; 64 | return Conn.Execute(query, new { id = id }); 65 | } 66 | } 67 | 68 | public IList GetList() 69 | { 70 | using (Conn) 71 | { 72 | string query = "SELECT * FROM Book"; 73 | return Conn.Query(query).ToList(); 74 | } 75 | } 76 | 77 | public Model.Book GetEntity(string id) 78 | { 79 | Book book; 80 | string query = "SELECT * FROM Book WHERE id = @id"; 81 | using (Conn) 82 | { 83 | book = Conn.Query(query, new { id = id }).SingleOrDefault(); 84 | return book; 85 | } 86 | } 87 | 88 | public Book GetEntityWithRefence(string id) 89 | { 90 | using (Conn) 91 | { 92 | string query = "SELECT * FROM Book b LEFT JOIN BookReview br ON br.BookId = b.Id WHERE b.id = @id"; 93 | Book lookup = null; 94 | var b = Conn.Query(query, 95 | (book, bookReview) => 96 | { 97 | if (lookup == null || lookup.Id != book.Id) 98 | lookup = book; 99 | if (bookReview != null) 100 | lookup.Reviews.Add(bookReview); 101 | return lookup; 102 | }, new { id = id }).Distinct().SingleOrDefault(); 103 | return b; 104 | } 105 | } 106 | 107 | #endregion 108 | 109 | 110 | } 111 | } -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/BookReviewDAL.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Dapper; 6 | using Dapper.IDAL; 7 | using Dapper.Factory; 8 | using System.Data; 9 | using Dapper.Model; 10 | 11 | /* 12 | * create by Mao Qingyu 13 | */ 14 | 15 | namespace Dapper.SQLServerDAL 16 | { 17 | public class BookReviewDAL : IBookReviewDAL 18 | { 19 | 20 | private IDbConnection _conn; 21 | public IDbConnection Conn 22 | { 23 | get 24 | { 25 | return _conn = ConnectionFactory.CreateConnection(); 26 | } 27 | } 28 | 29 | public int Insert(BookReview bookReview) 30 | { 31 | using (Conn) 32 | { 33 | string query = "INSERT INTO BookReview(BookId,Content)VALUES(@bookId,@content)"; 34 | return Conn.Execute(query, bookReview); 35 | } 36 | } 37 | 38 | public int Update(BookReview bookReview) 39 | { 40 | using (Conn) 41 | { 42 | string query = "UPDATE BookReview SET BookId=@bookId,Content=@content WHERE id =@id"; 43 | return Conn.Execute(query, bookReview); 44 | } 45 | } 46 | 47 | public int Delete(BookReview bookReview) 48 | { 49 | using (Conn) 50 | { 51 | string query = "DELETE FROM BookReview WHERE id = @id"; 52 | return Conn.Execute(query, bookReview); 53 | } 54 | } 55 | 56 | public int Delete(string id) 57 | { 58 | using (Conn) 59 | { 60 | string query = "DELETE FROM BookReview WHERE id = @id"; 61 | return Conn.Execute(query, new { id = id }); 62 | } 63 | } 64 | 65 | public IList GetList() 66 | { 67 | using (Conn) 68 | { 69 | string query = "SELECT * FROM BookReview"; 70 | return Conn.Query(query).ToList(); 71 | } 72 | } 73 | 74 | public BookReview GetEntity(string id) 75 | { 76 | BookReview br; 77 | string query = "SELECT * FROM BookReview WHERE id = @id"; 78 | using (Conn) 79 | { 80 | br = Conn.Query(query, 81 | (bookReview, book) => 82 | { 83 | bookReview.AssoicationWithBook = book; 84 | return bookReview; 85 | }, new { id = id }).SingleOrDefault(); 86 | return br; 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/Dapper.SQLServerDAL.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {3651CB78-6F6E-4176-BE83-B98CCC28C72D} 8 | Library 9 | Properties 10 | Dapper.SQLServerDAL 11 | Dapper.SQLServerDAL 12 | v4.0 13 | 512 14 | 15 | 16 | true 17 | full 18 | false 19 | bin\Debug\ 20 | DEBUG;TRACE 21 | prompt 22 | 4 23 | 24 | 25 | pdbonly 26 | true 27 | bin\Release\ 28 | TRACE 29 | prompt 30 | 4 31 | 32 | 33 | 34 | ..\packages\Dapper.1.12.1\lib\net40\Dapper.dll 35 | 36 | 37 | ..\packages\DapperExtensions.1.4.4\lib\net40\DapperExtensions.dll 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | {7e9067d2-1ecd-4c29-9b0e-97de6285188e} 55 | Dapper.Factory 56 | 57 | 58 | {33f17117-1bc9-416f-bfed-70393c8dae54} 59 | Dapper.IDAL 60 | 61 | 62 | {df4d28f8-8ec5-436a-8aba-ab52875dfcb3} 63 | Dapper.Model 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 80 | -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下 6 | // 特性集控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.SQLServerDAL")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.SQLServerDAL")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 则将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("93be0792-6d45-49e8-a69f-cb8e19458d56")] 24 | 25 | // 程序集的版本信息由下面四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Factory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Factory.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Factory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Factory.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.SQLServerDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.SQLServerDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.SQLServerDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.SQLServerDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/Dapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dapper 5 | 6 | 7 | 8 | 9 | Dapper, a light weight object mapper for ADO.NET 10 | 11 | 12 | 13 | 14 | Purge the query cache 15 | 16 | 17 | 18 | 19 | Return a count of all the cached queries by dapper 20 | 21 | 22 | 23 | 24 | 25 | Return a list of all the queries cached by dapper 26 | 27 | 28 | 29 | 30 | 31 | 32 | Deep diagnostics only: find any hash collisions in the cache 33 | 34 | 35 | 36 | 37 | 38 | Execute parameterized SQL 39 | 40 | Number of rows affected 41 | 42 | 43 | 44 | Return a list of dynamic objects, reader is closed after the call 45 | 46 | 47 | 48 | 49 | Executes a query, returning the data typed as per T 50 | 51 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object 52 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is 53 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive). 54 | 55 | 56 | 57 | 58 | Execute a command that returns multiple result sets, and access each in turn 59 | 60 | 61 | 62 | 63 | Return a typed list of objects, reader is closed after the call 64 | 65 | 66 | 67 | 68 | Maps a query to objects 69 | 70 | The first type in the recordset 71 | The second type in the recordset 72 | The return type 73 | 74 | 75 | 76 | 77 | 78 | 79 | The Field we should split and read the second object from (default: id) 80 | Number of seconds before command execution timeout 81 | Is it a stored proc or a batch? 82 | 83 | 84 | 85 | 86 | Maps a query to objects 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | The Field we should split and read the second object from (default: id) 99 | Number of seconds before command execution timeout 100 | 101 | 102 | 103 | 104 | 105 | Perform a multi mapping query with 4 input parameters 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | Perform a multi mapping query with 5 input parameters 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | Internal use only 147 | 148 | 149 | 150 | 151 | 152 | 153 | Internal use only 154 | 155 | 156 | 157 | 158 | Internal use only 159 | 160 | 161 | 162 | 163 | Internal use only 164 | 165 | 166 | 167 | 168 | Gets type-map for the given type 169 | 170 | Type map implementation, DefaultTypeMap instance if no override present 171 | 172 | 173 | 174 | Set custom mapping for type deserializers 175 | 176 | Entity type to override 177 | Mapping rules impementation, null to remove custom map 178 | 179 | 180 | 181 | Internal use only 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | Throws a data exception, only used internally 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | Called if the query cache is purged via PurgeQueryCache 201 | 202 | 203 | 204 | 205 | Implement this interface to pass an arbitrary db specific set of parameters to Dapper 206 | 207 | 208 | 209 | 210 | Add all the parameters needed to the command just before it executes 211 | 212 | The raw command prior to execution 213 | Information about the query 214 | 215 | 216 | 217 | Implement this interface to change default mapping of reader columns to type memebers 218 | 219 | 220 | 221 | 222 | Finds best constructor 223 | 224 | DataReader column names 225 | DataReader column types 226 | Matching constructor or default one 227 | 228 | 229 | 230 | Gets mapping for constructor parameter 231 | 232 | Constructor to resolve 233 | DataReader column name 234 | Mapping implementation 235 | 236 | 237 | 238 | Gets member mapping for column 239 | 240 | DataReader column name 241 | Mapping implementation 242 | 243 | 244 | 245 | Implements this interface to provide custom member mapping 246 | 247 | 248 | 249 | 250 | Source DataReader column name 251 | 252 | 253 | 254 | 255 | Target member type 256 | 257 | 258 | 259 | 260 | Target property 261 | 262 | 263 | 264 | 265 | Target field 266 | 267 | 268 | 269 | 270 | Target constructor parameter 271 | 272 | 273 | 274 | 275 | This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example), 276 | and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE** 277 | equality. The type is fully thread-safe. 278 | 279 | 280 | 281 | 282 | Identity of a cached query in Dapper, used for extensability 283 | 284 | 285 | 286 | 287 | Create an identity for use with DynamicParameters, internal use only 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | The sql 302 | 303 | 304 | 305 | 306 | The command type 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | Compare 2 Identity objects 343 | 344 | 345 | 346 | 347 | 348 | 349 | The grid reader provides interfaces for reading multiple result sets from a Dapper query 350 | 351 | 352 | 353 | 354 | Read the next grid of results, returned as a dynamic object 355 | 356 | 357 | 358 | 359 | Read the next grid of results 360 | 361 | 362 | 363 | 364 | Read multiple objects from a single recordset on the grid 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | Read multiple objects from a single recordset on the grid 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | Read multiple objects from a single record set on the grid 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | Read multiple objects from a single record set on the grid 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | Dispose the grid, closing and disposing both the underlying reader and command. 415 | 416 | 417 | 418 | 419 | A bag of parameters that can be passed to the Dapper Query and Execute methods 420 | 421 | 422 | 423 | 424 | construct a dynamic parameter bag 425 | 426 | 427 | 428 | 429 | construct a dynamic parameter bag 430 | 431 | can be an anonymous type or a DynamicParameters bag 432 | 433 | 434 | 435 | Append a whole object full of params to the dynamic 436 | EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic 437 | 438 | 439 | 440 | 441 | 442 | Add a parameter to this dynamic parameter list 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | Add all the parameters needed to the command just before it executes 453 | 454 | The raw command prior to execution 455 | Information about the query 456 | 457 | 458 | 459 | Get the value of a parameter 460 | 461 | 462 | 463 | The value, note DBNull.Value is not returned, instead the value is returned as null 464 | 465 | 466 | 467 | All the names of the param in the bag, use Get to yank them out 468 | 469 | 470 | 471 | 472 | This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar 473 | 474 | 475 | 476 | 477 | Create a new DbString 478 | 479 | 480 | 481 | 482 | Add the parameter to the command... internal use only 483 | 484 | 485 | 486 | 487 | 488 | 489 | Ansi vs Unicode 490 | 491 | 492 | 493 | 494 | Fixed length 495 | 496 | 497 | 498 | 499 | Length of the string -1 for max 500 | 501 | 502 | 503 | 504 | The value of the string 505 | 506 | 507 | 508 | 509 | Handles variances in features per DBMS 510 | 511 | 512 | 513 | 514 | Dictionary of supported features index by connection type name 515 | 516 | 517 | 518 | 519 | Gets the featureset based on the passed connection 520 | 521 | 522 | 523 | 524 | True if the db supports array columns e.g. Postgresql 525 | 526 | 527 | 528 | 529 | Represents simple memeber map for one of target parameter or property or field to source DataReader column 530 | 531 | 532 | 533 | 534 | Creates instance for simple property mapping 535 | 536 | DataReader column name 537 | Target property 538 | 539 | 540 | 541 | Creates instance for simple field mapping 542 | 543 | DataReader column name 544 | Target property 545 | 546 | 547 | 548 | Creates instance for simple constructor parameter mapping 549 | 550 | DataReader column name 551 | Target constructor parameter 552 | 553 | 554 | 555 | DataReader column name 556 | 557 | 558 | 559 | 560 | Target member type 561 | 562 | 563 | 564 | 565 | Target property 566 | 567 | 568 | 569 | 570 | Target field 571 | 572 | 573 | 574 | 575 | Target constructor parameter 576 | 577 | 578 | 579 | 580 | Represents default type mapping strategy used by Dapper 581 | 582 | 583 | 584 | 585 | Creates default type map 586 | 587 | Entity type 588 | 589 | 590 | 591 | Finds best constructor 592 | 593 | DataReader column names 594 | DataReader column types 595 | Matching constructor or default one 596 | 597 | 598 | 599 | Gets mapping for constructor parameter 600 | 601 | Constructor to resolve 602 | DataReader column name 603 | Mapping implementation 604 | 605 | 606 | 607 | Gets member mapping for column 608 | 609 | DataReader column name 610 | Mapping implementation 611 | 612 | 613 | 614 | Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping) 615 | 616 | 617 | 618 | 619 | Creates custom property mapping 620 | 621 | Target entity type 622 | Property selector based on target type and DataReader column name 623 | 624 | 625 | 626 | Always returns default constructor 627 | 628 | DataReader column names 629 | DataReader column types 630 | Default constructor 631 | 632 | 633 | 634 | Not impelmeneted as far as default constructor used for all cases 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | Returns property based on selector strategy 643 | 644 | DataReader column name 645 | Poperty member map 646 | 647 | 648 | 649 | -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.SQLServerDAL.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.SQLServerDAL.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.dll 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Factory.dll 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.IDAL.dll 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Model.dll 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Factory.pdb 8 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.IDAL.pdb 9 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Model.pdb 10 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.pdb 11 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.xml 12 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\obj\Debug\Dapper.SQLServerDAL.csprojResolveAssemblyReference.cache 13 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\obj\Debug\Dapper.SQLServerDAL.dll 14 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.SQLServerDAL\obj\Debug\Dapper.SQLServerDAL.pdb 15 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.SQLServerDAL.dll 16 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.SQLServerDAL.pdb 17 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.dll 18 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Factory.dll 19 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.IDAL.dll 20 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Model.dll 21 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\DapperExtensions.dll 22 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Factory.pdb 23 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.IDAL.pdb 24 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.Model.pdb 25 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.pdb 26 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\Dapper.xml 27 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\bin\Debug\DapperExtensions.pdb 28 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\obj\Debug\Dapper.SQLServerDAL.csprojResolveAssemblyReference.cache 29 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\obj\Debug\Dapper.SQLServerDAL.dll 30 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.SQLServerDAL\obj\Debug\Dapper.SQLServerDAL.pdb 31 | -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/obj/Debug/Dapper.SQLServerDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.SQLServerDAL/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.SQLServerDAL/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/BookDALTest.cs: -------------------------------------------------------------------------------- 1 | using Dapper.SQLServerDAL; 2 | using Microsoft.VisualStudio.TestTools.UnitTesting; 3 | using System; 4 | using Dapper.Model; 5 | 6 | namespace Dapper.Test 7 | { 8 | 9 | 10 | /// 11 | ///这是 BookDALTest 的测试类,旨在 12 | ///包含所有 BookDALTest 单元测试 13 | /// 14 | [TestClass()] 15 | public class BookDALTest 16 | { 17 | 18 | 19 | private TestContext testContextInstance; 20 | 21 | /// 22 | ///获取或设置测试上下文,上下文提供 23 | ///有关当前测试运行及其功能的信息。 24 | /// 25 | public TestContext TestContext 26 | { 27 | get 28 | { 29 | return testContextInstance; 30 | } 31 | set 32 | { 33 | testContextInstance = value; 34 | } 35 | } 36 | 37 | #region 附加测试特性 38 | // 39 | //编写测试时,还可使用以下特性: 40 | // 41 | //使用 ClassInitialize 在运行类中的第一个测试前先运行代码 42 | //[ClassInitialize()] 43 | //public static void MyClassInitialize(TestContext testContext) 44 | //{ 45 | //} 46 | // 47 | //使用 ClassCleanup 在运行完类中的所有测试后再运行代码 48 | //[ClassCleanup()] 49 | //public static void MyClassCleanup() 50 | //{ 51 | //} 52 | // 53 | //使用 TestInitialize 在运行每个测试前先运行代码 54 | //[TestInitialize()] 55 | //public void MyTestInitialize() 56 | //{ 57 | //} 58 | // 59 | //使用 TestCleanup 在运行完每个测试后运行代码 60 | //[TestCleanup()] 61 | //public void MyTestCleanup() 62 | //{ 63 | //} 64 | // 65 | #endregion 66 | 67 | 68 | /// 69 | ///GetEntity 的测试 70 | /// 71 | [TestMethod()] 72 | public void GetEntityTest() 73 | { 74 | BookDAL target = new BookDAL(); // TODO: 初始化为适当的值 75 | string id = "27"; // TODO: 初始化为适当的值 76 | Book expected = null; // TODO: 初始化为适当的值 77 | Book actual; 78 | actual = target.GetEntity(id); 79 | 80 | Assert.AreEqual("test", actual.Name); 81 | //Assert.Inconclusive("验证此测试方法的正确性。"); 82 | } 83 | 84 | /// 85 | ///Insert 的测试 86 | /// 87 | [TestMethod()] 88 | public void InsertTest() 89 | { 90 | BookDAL target = new BookDAL(); // TODO: 初始化为适当的值 91 | Book book = new Book 92 | { 93 | Name="Android程序设计" 94 | }; // TODO: 初始化为适当的值 95 | int expected = 0; // TODO: 初始化为适当的值 96 | int actual; 97 | actual = target.Insert(book); 98 | Assert.AreEqual(1, actual); 99 | // Assert.Inconclusive("验证此测试方法的正确性。"); 100 | } 101 | 102 | /// 103 | ///Update 的测试 104 | /// 105 | [TestMethod()] 106 | public void UpdateTest() 107 | { 108 | BookDAL target = new BookDAL(); // TODO: 初始化为适当的值 109 | Book book = new Book() 110 | { 111 | Id=1, 112 | Name="汇编语言" 113 | }; // TODO: 初始化为适当的值 114 | int expected = 0; // TODO: 初始化为适当的值 115 | int actual; 116 | actual = target.Update(book); 117 | Assert.AreEqual(1, actual); 118 | Assert.Inconclusive("验证此测试方法的正确性。"); 119 | } 120 | 121 | /// 122 | ///GetList 的测试 123 | /// 124 | [TestMethod()] 125 | public void GetListTest() 126 | { 127 | BookDAL target = new BookDAL(); // TODO: 初始化为适当的值 128 | string id = "1"; // TODO: 初始化为适当的值 129 | Book expected = null; // TODO: 初始化为适当的值 130 | Book actual; 131 | actual = target.GetEntityWithRefence(id); 132 | Console.WriteLine(actual); 133 | //Assert.AreEqual(expected, actual); 134 | //Assert.Inconclusive("验证此测试方法的正确性。"); 135 | } 136 | 137 | /// 138 | ///Insert 的测试 139 | /// 140 | [TestMethod()] 141 | public void InsertTest1() 142 | { 143 | BookDAL target = new BookDAL(); // TODO: 初始化为适当的值 144 | Book book = new Book { Name="test"}; // TODO: 初始化为适当的值 145 | int expected = 12; // TODO: 初始化为适当的值 146 | int actual; 147 | actual = target.Insert(book); 148 | Assert.AreEqual(expected, actual); 149 | Assert.Inconclusive("验证此测试方法的正确性。"); 150 | } 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/ClassDiagram1.cd: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/Dapper.Test.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | AnyCPU 6 | {7E84994B-B9C8-489D-A984-6EDD5370D96F} 7 | Library 8 | Properties 9 | Dapper.Test 10 | Dapper.Test 11 | v4.0 12 | 512 13 | {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 14 | 10.0 15 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 16 | $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages 17 | False 18 | UnitTest 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | ..\..\..\..\..\CodingPeasants\C#.NET\Assembly\dapper-dot-net\Dapper NET40\Dapper.dll 40 | 41 | 42 | False 43 | ..\packages\DapperExtensions.1.4.4\lib\net40\DapperExtensions.dll 44 | 45 | 46 | 47 | 48 | 3.5 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | {7E9067D2-1ECD-4C29-9B0E-97DE6285188E} 74 | Dapper.Factory 75 | 76 | 77 | {33F17117-1BC9-416F-BFED-70393C8DAE54} 78 | Dapper.IDAL 79 | 80 | 81 | {DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3} 82 | Dapper.Model 83 | 84 | 85 | {3651CB78-6F6E-4176-BE83-B98CCC28C72D} 86 | Dapper.SQLServerDAL 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | False 97 | 98 | 99 | False 100 | 101 | 102 | False 103 | 104 | 105 | False 106 | 107 | 108 | 109 | 110 | 111 | 112 | 119 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // 有关程序集的常规信息通过以下特性集 6 | // 控制。更改这些特性值可修改 7 | // 与程序集关联的信息。 8 | [assembly: AssemblyTitle("Dapper.Test")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Microsoft")] 12 | [assembly: AssemblyProduct("Dapper.Test")] 13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // 将 ComVisible 设置为 false 会使此程序集中的类型 18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型, 19 | // 请将该类型上的 ComVisible 特性设置为 true。 20 | [assembly: ComVisible(false)] 21 | 22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID 23 | [assembly: Guid("0b091e59-a550-4c60-b41e-e6858ab4b12b")] 24 | 25 | // 程序集的版本信息由以下四个值组成: 26 | // 27 | // 主版本 28 | // 次版本 29 | // 生成号 30 | // 修订号 31 | // 32 | // 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, 33 | // 方法是按如下所示使用“*”: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Factory.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.Factory.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Factory.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.Factory.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.IDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.IDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.IDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.IDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Model.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.Model.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Model.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.Model.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.SQLServerDAL.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.SQLServerDAL.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.SQLServerDAL.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.SQLServerDAL.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Test.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.Test.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Test.dll.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.Test.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.Test.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/Dapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/Dapper.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/bin/Debug/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/bin/Debug/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/obj/Debug/Dapper.Test.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Test.dll 2 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Test.pdb 3 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\obj\Debug\Dapper.Test.csprojResolveAssemblyReference.cache 4 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\obj\Debug\Dapper.Test.dll 5 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\obj\Debug\Dapper.Test.pdb 6 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.dll 7 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Factory.dll 8 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.IDAL.dll 9 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Model.dll 10 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.SQLServerDAL.dll 11 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Factory.pdb 12 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.IDAL.pdb 13 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Model.pdb 14 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.SQLServerDAL.pdb 15 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.pdb 16 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.xml 17 | F:\Workspace\visual studio 2012\Projects\Dapper\Dapper.Test\bin\Debug\Dapper.Test.dll.config 18 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Test.dll.config 19 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Test.dll 20 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Test.pdb 21 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Factory.dll 22 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.IDAL.dll 23 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Model.dll 24 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.SQLServerDAL.dll 25 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\DapperExtensions.dll 26 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Factory.pdb 27 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.IDAL.pdb 28 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.Model.pdb 29 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\Dapper.SQLServerDAL.pdb 30 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\bin\Debug\DapperExtensions.pdb 31 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\obj\Debug\Dapper.Test.csprojResolveAssemblyReference.cache 32 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\obj\Debug\Dapper.Test.dll 33 | F:\CodingPeasants\C#.NET\SourceCode\Dapper.NET\Dapper\Dapper.Test\obj\Debug\Dapper.Test.pdb 34 | -------------------------------------------------------------------------------- /Dapper/Dapper.Test/obj/Debug/Dapper.Test.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/obj/Debug/Dapper.Test.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Dapper/Dapper.Test/obj/Debug/Dapper.Test.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/obj/Debug/Dapper.Test.dll -------------------------------------------------------------------------------- /Dapper/Dapper.Test/obj/Debug/Dapper.Test.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/obj/Debug/Dapper.Test.pdb -------------------------------------------------------------------------------- /Dapper/Dapper.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.Test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Dapper/Dapper.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.Console", "Dapper.Console\Dapper.Console.csproj", "{7BA315E4-1DAD-44AF-B026-51478A1BDDD3}" 5 | EndProject 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.IDAL", "Dapper.IDAL\Dapper.IDAL.csproj", "{33F17117-1BC9-416F-BFED-70393C8DAE54}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.Model", "Dapper.Model\Dapper.Model.csproj", "{DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.Factory", "Dapper.Factory\Dapper.Factory.csproj", "{7E9067D2-1ECD-4C29-9B0E-97DE6285188E}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.SQLServerDAL", "Dapper.SQLServerDAL\Dapper.SQLServerDAL.csproj", "{3651CB78-6F6E-4176-BE83-B98CCC28C72D}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.Test", "Dapper.Test\Dapper.Test.csproj", "{7E84994B-B9C8-489D-A984-6EDD5370D96F}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.IBLL", "Dapper.IBLL\Dapper.IBLL.csproj", "{A57F9509-9D72-4826-B69B-E71E51BC141E}" 17 | EndProject 18 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper.BLL", "Dapper.BLL\Dapper.BLL.csproj", "{CE980EE9-F104-448E-8698-8D6721B838DD}" 19 | EndProject 20 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E8B36D6D-AF2F-4441-B4F0-A8F88CD71760}" 21 | ProjectSection(SolutionItems) = preProject 22 | ReadMe.txt = ReadMe.txt 23 | EndProjectSection 24 | EndProject 25 | Global 26 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 27 | Debug|Any CPU = Debug|Any CPU 28 | Release|Any CPU = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 31 | {7BA315E4-1DAD-44AF-B026-51478A1BDDD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {7BA315E4-1DAD-44AF-B026-51478A1BDDD3}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {7BA315E4-1DAD-44AF-B026-51478A1BDDD3}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {7BA315E4-1DAD-44AF-B026-51478A1BDDD3}.Release|Any CPU.Build.0 = Release|Any CPU 35 | {33F17117-1BC9-416F-BFED-70393C8DAE54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 36 | {33F17117-1BC9-416F-BFED-70393C8DAE54}.Debug|Any CPU.Build.0 = Debug|Any CPU 37 | {33F17117-1BC9-416F-BFED-70393C8DAE54}.Release|Any CPU.ActiveCfg = Release|Any CPU 38 | {33F17117-1BC9-416F-BFED-70393C8DAE54}.Release|Any CPU.Build.0 = Release|Any CPU 39 | {DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 40 | {DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3}.Debug|Any CPU.Build.0 = Debug|Any CPU 41 | {DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3}.Release|Any CPU.ActiveCfg = Release|Any CPU 42 | {DF4D28F8-8EC5-436A-8ABA-AB52875DFCB3}.Release|Any CPU.Build.0 = Release|Any CPU 43 | {7E9067D2-1ECD-4C29-9B0E-97DE6285188E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 44 | {7E9067D2-1ECD-4C29-9B0E-97DE6285188E}.Debug|Any CPU.Build.0 = Debug|Any CPU 45 | {7E9067D2-1ECD-4C29-9B0E-97DE6285188E}.Release|Any CPU.ActiveCfg = Release|Any CPU 46 | {7E9067D2-1ECD-4C29-9B0E-97DE6285188E}.Release|Any CPU.Build.0 = Release|Any CPU 47 | {3651CB78-6F6E-4176-BE83-B98CCC28C72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 48 | {3651CB78-6F6E-4176-BE83-B98CCC28C72D}.Debug|Any CPU.Build.0 = Debug|Any CPU 49 | {3651CB78-6F6E-4176-BE83-B98CCC28C72D}.Release|Any CPU.ActiveCfg = Release|Any CPU 50 | {3651CB78-6F6E-4176-BE83-B98CCC28C72D}.Release|Any CPU.Build.0 = Release|Any CPU 51 | {7E84994B-B9C8-489D-A984-6EDD5370D96F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 52 | {7E84994B-B9C8-489D-A984-6EDD5370D96F}.Debug|Any CPU.Build.0 = Debug|Any CPU 53 | {7E84994B-B9C8-489D-A984-6EDD5370D96F}.Release|Any CPU.ActiveCfg = Release|Any CPU 54 | {7E84994B-B9C8-489D-A984-6EDD5370D96F}.Release|Any CPU.Build.0 = Release|Any CPU 55 | {A57F9509-9D72-4826-B69B-E71E51BC141E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 56 | {A57F9509-9D72-4826-B69B-E71E51BC141E}.Debug|Any CPU.Build.0 = Debug|Any CPU 57 | {A57F9509-9D72-4826-B69B-E71E51BC141E}.Release|Any CPU.ActiveCfg = Release|Any CPU 58 | {A57F9509-9D72-4826-B69B-E71E51BC141E}.Release|Any CPU.Build.0 = Release|Any CPU 59 | {CE980EE9-F104-448E-8698-8D6721B838DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 60 | {CE980EE9-F104-448E-8698-8D6721B838DD}.Debug|Any CPU.Build.0 = Debug|Any CPU 61 | {CE980EE9-F104-448E-8698-8D6721B838DD}.Release|Any CPU.ActiveCfg = Release|Any CPU 62 | {CE980EE9-F104-448E-8698-8D6721B838DD}.Release|Any CPU.Build.0 = Release|Any CPU 63 | EndGlobalSection 64 | GlobalSection(SolutionProperties) = preSolution 65 | HideSolutionNode = FALSE 66 | EndGlobalSection 67 | EndGlobal 68 | -------------------------------------------------------------------------------- /Dapper/Dapper.v11.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/Dapper.v11.suo -------------------------------------------------------------------------------- /Dapper/TestResults/Dapper.TE.Tests.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/TestResults/Dapper.TE.Tests.mdf -------------------------------------------------------------------------------- /Dapper/TestResults/Dapper.TE.Tests_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/TestResults/Dapper.TE.Tests_log.ldf -------------------------------------------------------------------------------- /Dapper/packages/Dapper.1.12.1/Dapper.1.12.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/Dapper.1.12.1/Dapper.1.12.1.nupkg -------------------------------------------------------------------------------- /Dapper/packages/Dapper.1.12.1/lib/net35/Dapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/Dapper.1.12.1/lib/net35/Dapper.dll -------------------------------------------------------------------------------- /Dapper/packages/Dapper.1.12.1/lib/net35/Dapper.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/Dapper.1.12.1/lib/net35/Dapper.pdb -------------------------------------------------------------------------------- /Dapper/packages/Dapper.1.12.1/lib/net40/Dapper.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/Dapper.1.12.1/lib/net40/Dapper.dll -------------------------------------------------------------------------------- /Dapper/packages/Dapper.1.12.1/lib/net40/Dapper.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/Dapper.1.12.1/lib/net40/Dapper.pdb -------------------------------------------------------------------------------- /Dapper/packages/Dapper.1.12.1/lib/net40/Dapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Dapper 5 | 6 | 7 | 8 | 9 | Dapper, a light weight object mapper for ADO.NET 10 | 11 | 12 | 13 | 14 | Purge the query cache 15 | 16 | 17 | 18 | 19 | Return a count of all the cached queries by dapper 20 | 21 | 22 | 23 | 24 | 25 | Return a list of all the queries cached by dapper 26 | 27 | 28 | 29 | 30 | 31 | 32 | Deep diagnostics only: find any hash collisions in the cache 33 | 34 | 35 | 36 | 37 | 38 | Execute parameterized SQL 39 | 40 | Number of rows affected 41 | 42 | 43 | 44 | Return a list of dynamic objects, reader is closed after the call 45 | 46 | 47 | 48 | 49 | Executes a query, returning the data typed as per T 50 | 51 | the dynamic param may seem a bit odd, but this works around a major usability issue in vs, if it is Object vs completion gets annoying. Eg type new [space] get new object 52 | A sequence of data of the supplied type; if a basic type (int, string, etc) is queried then the data from the first column in assumed, otherwise an instance is 53 | created per row, and a direct column-name===member-name mapping is assumed (case insensitive). 54 | 55 | 56 | 57 | 58 | Execute a command that returns multiple result sets, and access each in turn 59 | 60 | 61 | 62 | 63 | Return a typed list of objects, reader is closed after the call 64 | 65 | 66 | 67 | 68 | Maps a query to objects 69 | 70 | The first type in the recordset 71 | The second type in the recordset 72 | The return type 73 | 74 | 75 | 76 | 77 | 78 | 79 | The Field we should split and read the second object from (default: id) 80 | Number of seconds before command execution timeout 81 | Is it a stored proc or a batch? 82 | 83 | 84 | 85 | 86 | Maps a query to objects 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | The Field we should split and read the second object from (default: id) 99 | Number of seconds before command execution timeout 100 | 101 | 102 | 103 | 104 | 105 | Perform a multi mapping query with 4 input parameters 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | Perform a multi mapping query with 5 input parameters 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | Internal use only 147 | 148 | 149 | 150 | 151 | 152 | 153 | Internal use only 154 | 155 | 156 | 157 | 158 | Internal use only 159 | 160 | 161 | 162 | 163 | Internal use only 164 | 165 | 166 | 167 | 168 | Gets type-map for the given type 169 | 170 | Type map implementation, DefaultTypeMap instance if no override present 171 | 172 | 173 | 174 | Set custom mapping for type deserializers 175 | 176 | Entity type to override 177 | Mapping rules impementation, null to remove custom map 178 | 179 | 180 | 181 | Internal use only 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | Throws a data exception, only used internally 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | Called if the query cache is purged via PurgeQueryCache 201 | 202 | 203 | 204 | 205 | Implement this interface to pass an arbitrary db specific set of parameters to Dapper 206 | 207 | 208 | 209 | 210 | Add all the parameters needed to the command just before it executes 211 | 212 | The raw command prior to execution 213 | Information about the query 214 | 215 | 216 | 217 | Implement this interface to change default mapping of reader columns to type memebers 218 | 219 | 220 | 221 | 222 | Finds best constructor 223 | 224 | DataReader column names 225 | DataReader column types 226 | Matching constructor or default one 227 | 228 | 229 | 230 | Gets mapping for constructor parameter 231 | 232 | Constructor to resolve 233 | DataReader column name 234 | Mapping implementation 235 | 236 | 237 | 238 | Gets member mapping for column 239 | 240 | DataReader column name 241 | Mapping implementation 242 | 243 | 244 | 245 | Implements this interface to provide custom member mapping 246 | 247 | 248 | 249 | 250 | Source DataReader column name 251 | 252 | 253 | 254 | 255 | Target member type 256 | 257 | 258 | 259 | 260 | Target property 261 | 262 | 263 | 264 | 265 | Target field 266 | 267 | 268 | 269 | 270 | Target constructor parameter 271 | 272 | 273 | 274 | 275 | This is a micro-cache; suitable when the number of terms is controllable (a few hundred, for example), 276 | and strictly append-only; you cannot change existing values. All key matches are on **REFERENCE** 277 | equality. The type is fully thread-safe. 278 | 279 | 280 | 281 | 282 | Identity of a cached query in Dapper, used for extensability 283 | 284 | 285 | 286 | 287 | Create an identity for use with DynamicParameters, internal use only 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | The sql 302 | 303 | 304 | 305 | 306 | The command type 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | Compare 2 Identity objects 343 | 344 | 345 | 346 | 347 | 348 | 349 | The grid reader provides interfaces for reading multiple result sets from a Dapper query 350 | 351 | 352 | 353 | 354 | Read the next grid of results, returned as a dynamic object 355 | 356 | 357 | 358 | 359 | Read the next grid of results 360 | 361 | 362 | 363 | 364 | Read multiple objects from a single recordset on the grid 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | Read multiple objects from a single recordset on the grid 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | Read multiple objects from a single record set on the grid 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | Read multiple objects from a single record set on the grid 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | Dispose the grid, closing and disposing both the underlying reader and command. 415 | 416 | 417 | 418 | 419 | A bag of parameters that can be passed to the Dapper Query and Execute methods 420 | 421 | 422 | 423 | 424 | construct a dynamic parameter bag 425 | 426 | 427 | 428 | 429 | construct a dynamic parameter bag 430 | 431 | can be an anonymous type or a DynamicParameters bag 432 | 433 | 434 | 435 | Append a whole object full of params to the dynamic 436 | EG: AddDynamicParams(new {A = 1, B = 2}) // will add property A and B to the dynamic 437 | 438 | 439 | 440 | 441 | 442 | Add a parameter to this dynamic parameter list 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | Add all the parameters needed to the command just before it executes 453 | 454 | The raw command prior to execution 455 | Information about the query 456 | 457 | 458 | 459 | Get the value of a parameter 460 | 461 | 462 | 463 | The value, note DBNull.Value is not returned, instead the value is returned as null 464 | 465 | 466 | 467 | All the names of the param in the bag, use Get to yank them out 468 | 469 | 470 | 471 | 472 | This class represents a SQL string, it can be used if you need to denote your parameter is a Char vs VarChar vs nVarChar vs nChar 473 | 474 | 475 | 476 | 477 | Create a new DbString 478 | 479 | 480 | 481 | 482 | Add the parameter to the command... internal use only 483 | 484 | 485 | 486 | 487 | 488 | 489 | Ansi vs Unicode 490 | 491 | 492 | 493 | 494 | Fixed length 495 | 496 | 497 | 498 | 499 | Length of the string -1 for max 500 | 501 | 502 | 503 | 504 | The value of the string 505 | 506 | 507 | 508 | 509 | Handles variances in features per DBMS 510 | 511 | 512 | 513 | 514 | Dictionary of supported features index by connection type name 515 | 516 | 517 | 518 | 519 | Gets the featureset based on the passed connection 520 | 521 | 522 | 523 | 524 | True if the db supports array columns e.g. Postgresql 525 | 526 | 527 | 528 | 529 | Represents simple memeber map for one of target parameter or property or field to source DataReader column 530 | 531 | 532 | 533 | 534 | Creates instance for simple property mapping 535 | 536 | DataReader column name 537 | Target property 538 | 539 | 540 | 541 | Creates instance for simple field mapping 542 | 543 | DataReader column name 544 | Target property 545 | 546 | 547 | 548 | Creates instance for simple constructor parameter mapping 549 | 550 | DataReader column name 551 | Target constructor parameter 552 | 553 | 554 | 555 | DataReader column name 556 | 557 | 558 | 559 | 560 | Target member type 561 | 562 | 563 | 564 | 565 | Target property 566 | 567 | 568 | 569 | 570 | Target field 571 | 572 | 573 | 574 | 575 | Target constructor parameter 576 | 577 | 578 | 579 | 580 | Represents default type mapping strategy used by Dapper 581 | 582 | 583 | 584 | 585 | Creates default type map 586 | 587 | Entity type 588 | 589 | 590 | 591 | Finds best constructor 592 | 593 | DataReader column names 594 | DataReader column types 595 | Matching constructor or default one 596 | 597 | 598 | 599 | Gets mapping for constructor parameter 600 | 601 | Constructor to resolve 602 | DataReader column name 603 | Mapping implementation 604 | 605 | 606 | 607 | Gets member mapping for column 608 | 609 | DataReader column name 610 | Mapping implementation 611 | 612 | 613 | 614 | Implements custom property mapping by user provided criteria (usually presence of some custom attribute with column to member mapping) 615 | 616 | 617 | 618 | 619 | Creates custom property mapping 620 | 621 | Target entity type 622 | Property selector based on target type and DataReader column name 623 | 624 | 625 | 626 | Always returns default constructor 627 | 628 | DataReader column names 629 | DataReader column types 630 | Default constructor 631 | 632 | 633 | 634 | Not impelmeneted as far as default constructor used for all cases 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | Returns property based on selector strategy 643 | 644 | DataReader column name 645 | Poperty member map 646 | 647 | 648 | 649 | -------------------------------------------------------------------------------- /Dapper/packages/DapperExtensions.1.4.4/DapperExtensions.1.4.4.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/DapperExtensions.1.4.4/DapperExtensions.1.4.4.nupkg -------------------------------------------------------------------------------- /Dapper/packages/DapperExtensions.1.4.4/lib/net40/DapperExtensions.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/DapperExtensions.1.4.4/lib/net40/DapperExtensions.dll -------------------------------------------------------------------------------- /Dapper/packages/DapperExtensions.1.4.4/lib/net40/DapperExtensions.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/maoqyhz/3-Tier-Architecture-using-dapper/1ef053e849a2ee010e6ae2b4730e1ce008f66f86/Dapper/packages/DapperExtensions.1.4.4/lib/net40/DapperExtensions.pdb -------------------------------------------------------------------------------- /Dapper/packages/repositories.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 3-Tier-Architecture-using-dapper 2 | 3 | using StackExchange/dapper-dot-net to develop 3-Tier Architecture. Just a simple example in study. 4 | 5 | A simple 3-tier architecture using the Dapper relational object mapper. 6 | 7 | - Dapper:a simple object mapper for .Net developed by Stackexchange. 8 | 9 | - Dapper-Extensions:Dapper Extensions is a small library that complements Dapper by adding basic CRUD operations (Get, Insert, Update, Delete) for your POCOs. 10 | 11 | ## UI layer: 12 | Dapper.Console:A simple console program act as UI layer. 13 | 14 | ## Business logic layer: 15 | - Dapper.IBLL:BLL's abstract interface. 16 | - Dapper.BLL:BLL's implementation。(call different DAL layers depending on the configuration file) 17 | 18 | ## Data access layer: 19 | - Dapper.IDAL:DAL's abstract interface. 20 | - Dapper.SQLServerDAL:Implementation of different databases,derived from IDAL interface. 21 | 22 | ## Entity : 23 | Dapper.Model:database model. 24 | 25 | ## Decoupling : 26 | Dapper.Factory:factory.Create a corresponding instance from the factory。DALFactory create concrete DAL. 27 | 28 | ## Unit test: 29 | Dapper.Test:Perform a unit test for the database. Unit test project can not directly read Dapper.Console *App.config*. Copy it over. 30 | Need to Mock test, you can refer to the use of MS Fakes, Moq and other test framework. 31 | --------------------------------------------------------------------------------