Commit 28c33d45 authored by Sam Saffron's avatar Sam Saffron

Dapper rainbow is now on nuget

parent c9160c13
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
<Name>Dapper</Name> <Name>Dapper</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<None Include="Dapper.Rainbow.nuspec" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.
......
<?xml version="1.0"?>
<package >
<metadata>
<id>Dapper.Rainbow</id>
<version>0.1</version>
<title>Dapper.Rainbow</title>
<authors>Sam Saffron</authors>
<owners>Sam Saffron</owners>
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
<projectUrl>http://code.google.com/p/dapper-dot-net/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Trivial micro-orm implemented on Dapper, provides with CRUD helpers</description>
<releaseNotes>* version 0.1 </releaseNotes>
<copyright>Copyright Sam Saffron 2012</copyright>
<tags>orm dapper micro-orm</tags>
<dependencies>
<dependency id="Dapper" version="1.8" />
</dependencies>
</metadata>
<files>
<file src="bin\Release\Dapper.Rainbow.dll" target="lib\net40" />
</files>
</package>
\ No newline at end of file
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.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
...@@ -65,7 +70,7 @@ public string TableName ...@@ -65,7 +70,7 @@ public string TableName
/// <returns></returns> /// <returns></returns>
public int Update(int id, dynamic data) public int Update(int id, dynamic data)
{ {
List<string> paramNames = GetParamNames(data); List<string> paramNames = GetParamNames((object)data);
var builder = new StringBuilder(); var builder = new StringBuilder();
builder.Append("update [").Append(TableName).Append("] set "); builder.Append("update [").Append(TableName).Append("] set ");
...@@ -135,7 +140,7 @@ private static List<string> GetParamNames(object o) ...@@ -135,7 +140,7 @@ private static List<string> GetParamNames(object o)
DbTransaction transaction; DbTransaction transaction;
public static TDatabase Create(DbConnection connection, int commandTimeout) public static TDatabase Init(DbConnection connection, int commandTimeout)
{ {
TDatabase db = new TDatabase(); TDatabase db = new TDatabase();
db.InitDatabase(connection, commandTimeout); db.InitDatabase(connection, commandTimeout);
...@@ -173,7 +178,7 @@ public void RollbackTransaction() ...@@ -173,7 +178,7 @@ public void RollbackTransaction()
transaction = null; transaction = null;
} }
public Action<Database<TDatabase>> CreateTableConstructor() protected Action<Database<TDatabase>> CreateTableConstructor()
{ {
var dm = new DynamicMethod("ConstructInstances", null, new Type[] { typeof(Database<TDatabase>) }, true); var dm = new DynamicMethod("ConstructInstances", null, new Type[] { typeof(Database<TDatabase>) }, true);
var il = dm.GetILGenerator(); var il = dm.GetILGenerator();
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Dapper.Rainbow")] [assembly: AssemblyTitle("Dapper.Rainbow")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("I sample mini ORM implementation using Dapper")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Dapper.Rainbow")] [assembly: AssemblyProduct("Dapper.Rainbow")]
[assembly: AssemblyCopyright("Copyright © 2012")] [assembly: AssemblyCopyright("Sam Saffron Copyright © 2012")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
...@@ -32,5 +32,5 @@ ...@@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("0.1.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.Collections.Generic;
using System.Linq; using System.Linq;
using System.Web; using System.Web;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment