Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@ $RECYCLE.BIN/

# Mac desktop service store files
.DS_Store
/packages/Dapper.1.42
6 changes: 3 additions & 3 deletions DapperUnitOfWork.Console/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

They have never in any way contributed to this code, and the false attribution has been reported to StackOverflow. */

using DapperUnitOfWork.Data;
using DapperUnitOfWork.Domain;
using DapperUnitOfWork.Domain.Entities;
//using DapperUnitOfWork.Data;
//using DapperUnitOfWork.Domain;
//using DapperUnitOfWork.Domain.Entities;
using DapperUnitOfWork.Entities;
using System;
using System.Collections.Generic;
Expand Down
1 change: 0 additions & 1 deletion DapperUnitOfWork/DapperUnitOfWork.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
<ItemGroup>
<Reference Include="Dapper, Version=1.40.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Dapper.1.42\lib\net45\Dapper.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
3 changes: 2 additions & 1 deletion DapperUnitOfWork/Repositories/CatRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ public CatRepository(IDbTransaction transaction)
public IEnumerable<Cat> All()
{
return Connection.Query<Cat>(
"SELECT * FROM Cat"
"SELECT * FROM Cat",
transaction:Transaction
);
}

Expand Down
1 change: 1 addition & 0 deletions DapperUnitOfWork/UnitOfWork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class UnitOfWork : IUnitOfWork

public UnitOfWork(string connectionString)
{
connectionString = "Server=(localdb)\\MSSQLLocalDb;Database=LosGatos;User Id=LosGatosUser;Password=Password123;";
_connection = new SqlConnection(connectionString);
_connection.Open();
_transaction = _connection.BeginTransaction();
Expand Down