This dapper unit of work repository implementation, originally implemented using petrhaus's UOW repository, but after many tests i couldn't make it work as i expected. Still, thanks for your generosity for sharing his repository, i could enlight myself and find a good structure for my UoW.
Be sure to change your VS language version to C# >= and your .NET Core to >=
- Download/Clone the repository;
- Check your .NET Core Framework version and the project's language version;
- Generate a dabase using the database.sql, copy and past the connectionString into the Program.cs;
- Build the solution and run your tests.
It does support both sync and async with trasactions.
IEnumerable Get() and Task<IEnumerable> GetAsync() were suposed to return a single object instead or a list. Both are meant to match and retrieve a single instance in the database.
Since i coulnd't unfold the Task returned in the Async method, i could only return the returned result Dapper's QueryAsync was delivering.
See all changes history with details here.