Skip to content

Gibe/Gibe.NPoco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gibe.NPoco

Adds UnitOfWork pattern support to NPoco

IUnitOfWorkProvider

GetUnitOfWork() : IUnitOfWork

IUnitOfWork

Commit() : void
Database : IDatabase

Allows you to do multiple database operations in a transaction. Uses IDisposable interface and disposing the object will rollback the transaction unless Commit() is called first.

Sample usage:

using(var unitOfWork = _unitOfWorkProvider.GetUnitOfWork()) 
{
    // Do operations with the database like
    unitOfWork.Database.Insert(objectToInsert)

    unitOfWork.Commit();
}

IDatabaseProvider

Returns an NPoco IDatabase object

GetDatabase(): IDatabase 

About

UnitOfWork support for NPoco

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages