提交 2171ab1a 编写于 作者: S Sam "Waffles" Saffron

reorganised and added a nuget pack

--HG--
rename : Properties/AssemblyInfo.cs => Dapper/Properties/AssemblyInfo.cs
rename : SqlMapper.cs => Dapper/SqlMapper.cs
rename : SqlMapper.csproj => Tests/DapperTests.csproj
rename : EntityFramework/Model.Designer.cs => Tests/EntityFramework/Model.Designer.cs
rename : EntityFramework/Model.edmx => Tests/EntityFramework/Model.edmx
rename : License.txt => Tests/License.txt
rename : Linq2Sql/DataClasses.dbml => Tests/Linq2Sql/DataClasses.dbml
rename : Linq2Sql/DataClasses.dbml.layout => Tests/Linq2Sql/DataClasses.dbml.layout
rename : Linq2Sql/DataClasses.designer.cs => Tests/Linq2Sql/DataClasses.designer.cs
rename : Linq2Sql/Post.cs => Tests/Linq2Sql/Post.cs
rename : Massive/Massive.cs => Tests/Massive/Massive.cs
rename : NHibernate/Iesi.Collections.dll => Tests/NHibernate/Iesi.Collections.dll
rename : NHibernate/LinFu.DynamicProxy.dll => Tests/NHibernate/LinFu.DynamicProxy.dll
rename : NHibernate/NHibernate.ByteCode.LinFu.dll => Tests/NHibernate/NHibernate.ByteCode.LinFu.dll
rename : NHibernate/NHibernate.dll => Tests/NHibernate/NHibernate.dll
rename : NHibernate/NHibernateHelper.cs => Tests/NHibernate/NHibernateHelper.cs
rename : NHibernate/Post.hbm.xml => Tests/NHibernate/Post.hbm.xml
rename : NHibernate/hibernate.cfg.xml => Tests/NHibernate/hibernate.cfg.xml
rename : OrmLite/ServiceStack.Common.dll => Tests/OrmLite/ServiceStack.Common.dll
rename : OrmLite/ServiceStack.Interfaces.dll => Tests/OrmLite/ServiceStack.Interfaces.dll
rename : OrmLite/ServiceStack.OrmLite.SqlServer.dll => Tests/OrmLite/ServiceStack.OrmLite.SqlServer.dll
rename : OrmLite/ServiceStack.OrmLite.dll => Tests/OrmLite/ServiceStack.OrmLite.dll
rename : OrmLite/ServiceStack.Text.dll => Tests/OrmLite/ServiceStack.Text.dll
rename : PerformanceTests.cs => Tests/PerformanceTests.cs
rename : PetaPoco/PetaPoco.cs => Tests/PetaPoco/PetaPoco.cs
rename : Program.cs => Tests/Program.cs
rename : Properties/AssemblyInfo.cs => Tests/Properties/AssemblyInfo.cs
rename : Properties/Settings.Designer.cs => Tests/Properties/Settings.Designer.cs
rename : Properties/Settings.settings => Tests/Properties/Settings.settings
rename : SubSonic/ActiveRecord.cs => Tests/SubSonic/ActiveRecord.cs
rename : SubSonic/ActiveRecord.tt => Tests/SubSonic/ActiveRecord.tt
rename : SubSonic/Context.cs => Tests/SubSonic/Context.cs
rename : SubSonic/Context.tt => Tests/SubSonic/Context.tt
rename : SubSonic/SQLServer.ttinclude => Tests/SubSonic/SQLServer.ttinclude
rename : SubSonic/Settings.ttinclude => Tests/SubSonic/Settings.ttinclude
rename : SubSonic/StoredProcedures.cs => Tests/SubSonic/StoredProcedures.cs
rename : SubSonic/StoredProcedures.tt => Tests/SubSonic/StoredProcedures.tt
rename : SubSonic/Structs.cs => Tests/SubSonic/Structs.cs
rename : SubSonic/Structs.tt => Tests/SubSonic/Structs.tt
rename : SubSonic/SubSonic.Core.dll => Tests/SubSonic/SubSonic.Core.dll
rename : Tests.cs => Tests/Tests.cs
rename : app.config => Tests/app.config
rename : bltoolkit/BLToolkit.4.dll => Tests/bltoolkit/BLToolkit.4.dll
上级 3425b285

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapper", "Dapper\Dapper.csproj", "{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DapperTests", "Tests\DapperTests.csproj", "{A2A80512-11F4-4028-A995-505463632C84}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Debug|x86.ActiveCfg = Debug|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Release|Any CPU.Build.0 = Release|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}.Release|x86.ActiveCfg = Release|Any CPU
{A2A80512-11F4-4028-A995-505463632C84}.Debug|Any CPU.ActiveCfg = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Debug|Mixed Platforms.Build.0 = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Debug|x86.ActiveCfg = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Debug|x86.Build.0 = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|Any CPU.ActiveCfg = Release|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|Mixed Platforms.ActiveCfg = Release|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|Mixed Platforms.Build.0 = Release|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|x86.ActiveCfg = Release|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Dapper</RootNamespace>
<AssemblyName>Dapper</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="SqlMapper.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="dapper.nuspec" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
\ No newline at end of file
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Dapper")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Stack Exchange")]
[assembly: AssemblyProduct("Dapper")]
[assembly: AssemblyCopyright("Copyright © Sam Saffron 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("59080aa9-fa65-438f-ad2e-772d840effa9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System;
/*
License: http://www.apache.org/licenses/LICENSE-2.0
Home page: http://code.google.com/p/dapper-dot-net/
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -11,7 +16,7 @@
using System.Dynamic;
using System.Collections;
namespace SqlMapper
namespace Dapper
{
public static class SqlMapper
{
......@@ -88,7 +93,7 @@ private ParamInfo()
public static ParamInfo Create(string name, DbType type, object val)
{
return new ParamInfo { Name = name, Type = type, Val = val};
return new ParamInfo { Name = name, Type = type, Val = val };
}
public DbType Type { get; private set; }
......@@ -99,7 +104,7 @@ public static ParamInfo Create(string name, DbType type, object val)
private class Identity : IEquatable<Identity>
{
public String ConnectionString { get {return connectionString;} }
public String ConnectionString { get { return connectionString; } }
public Type Type { get { return type; } }
public string Sql { get { return sql; } }
internal Identity(string sql, IDbConnection cnn, Type type)
......@@ -145,9 +150,9 @@ static class DynamicStub
public static Type Type = typeof(DynamicStub);
}
public static List<dynamic> ExecuteMapperQuery (this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null)
public static List<dynamic> ExecuteMapperQuery(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null)
{
var identity = new Identity(sql,cnn, DynamicStub.Type);
var identity = new Identity(sql, cnn, DynamicStub.Type);
var list = new List<dynamic>();
using (var reader = GetReader(cnn, transaction, sql, GetParamInfo(param)))
......@@ -161,7 +166,7 @@ public static List<dynamic> ExecuteMapperQuery (this IDbConnection cnn, string s
return list;
}
public static List<T> ExecuteMapperQuery<T>(this IDbConnection cnn, string sql, object param = null, SqlTransaction transaction = null)
{
var identity = new Identity(sql, cnn, typeof(T));
......@@ -233,7 +238,7 @@ private static object GetDynamicDeserializer(IDataReader reader)
}
Func<IDataReader, ExpandoObject> rval =
r =>
r =>
{
IDictionary<string, object> row = new ExpandoObject();
int i = 0;
......@@ -288,7 +293,7 @@ private static object GetDynamicDeserializer(IDataReader reader)
private static IDbCommand SetupCommand(IDbConnection cnn, IDbTransaction tranaction, string sql, List<ParamInfo> paramInfo)
{
var cmd = cnn.CreateCommand();
cmd.Transaction = tranaction;
cmd.CommandText = sql;
if (paramInfo != null)
......@@ -297,7 +302,7 @@ private static IDbCommand SetupCommand(IDbConnection cnn, IDbTransaction tranact
{
var param = cmd.CreateParameter();
param.ParameterName = "@" + info.Name;
param.DbType = info.Type;
param.DbType = info.Type;
param.Value = info.Val ?? DBNull.Value;
param.Direction = ParameterDirection.Input;
if (info.Type == DbType.String)
......@@ -325,7 +330,7 @@ private static IDbCommand SetupCommand(IDbConnection cnn, IDbTransaction tranact
{
count++;
var listParam = cmd.CreateParameter();
listParam.ParameterName = "@" + info.Name + count;
listParam.ParameterName = "@" + info.Name + count;
listParam.Value = item ?? DBNull.Value;
if (isString)
{
......
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Dapper</id>
<version>1.0</version>
<authors>Sam Saffron</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>A high performance micro ORM</description>
<projectUrl>http://code.google.com/p/dapper-dot-net/</projectUrl>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<frameworkAssemblies>
<frameworkAssembly assemblyName="System.Core" targetFramework="net40-client, net40" />
<frameworkAssembly assemblyName="System" targetFramework="net40-client, net40" />
<frameworkAssembly assemblyName="System.Data" targetFramework="net40-client, net40" />
<frameworkAssembly assemblyName="Microsoft.CSharp" targetFramework="net40-client, net40" />
</frameworkAssemblies>
</metadata>
<files>
<file src="bin\Release\dapper.dll" target="lib" />
</files>
</package>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SqlMapper", "SqlMapper.csproj", "{A2A80512-11F4-4028-A995-505463632C84}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A2A80512-11F4-4028-A995-505463632C84}.Debug|x86.ActiveCfg = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Debug|x86.Build.0 = Debug|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|x86.ActiveCfg = Release|x86
{A2A80512-11F4-4028-A995-505463632C84}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
......@@ -109,7 +109,6 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="SqlMapper.cs" />
<Compile Include="SubSonic\ActiveRecord.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
......@@ -187,6 +186,12 @@
<ItemGroup>
<Folder Include="bltoolkit\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Dapper\Dapper.csproj">
<Project>{DAF737E1-05B5-4189-A5AA-DAC6233B64D7}</Project>
<Name>Dapper</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
......
......@@ -11,6 +11,7 @@
using System.Diagnostics;
using Massive;
using SqlMapper.NHibernate;
using Dapper;
namespace SqlMapper
{
......
......@@ -3,6 +3,7 @@
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using Dapper;
namespace SqlMapper
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册