Skip to content

Instantly share code, notes, and snippets.

View Kaushik1987's full-sized avatar

Kaushik Thanki Kaushik1987

View GitHub Profile
@Kaushik1987
Kaushik1987 / UnitOfWork.cs
Created October 3, 2019 10:02 — forked from azborgonovo/UnitOfWork.cs
Creating the 'best' Unit of Work and Repository implementation on C#
// Basic unitOfWork pattern as described by Martin Fowler (http://martinfowler.com/eaaCatalog/unitOfWork.html)
// Other methos as 'registerNew' are going to be managed by each repository
public interface IUnitOfWork : IDisposable
{
void Commit();
Task CommitAsync();
void Rollback();
}
public interface IUnitOfWorkFactory