UnitOfWork Class

Template MVC

UnitOfWork Class

Works to encampsulate all repositories, all the repositories will work with one DBContext to encapsulate all the changes in one transaction
Inheritance Hierarchy
SystemObject  Template.Repository.CoreUnitOfWork

Namespace:  Template.Repository.Core
Assembly:  Template.Repository (in Template.Repository.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class UnitOfWork : IUnitOfWork, IDisposable

The UnitOfWork type exposes the following members.

Constructors
  NameDescription
Public methodUnitOfWork
Constructor of UnitOfWork
Top
Properties
  NameDescription
Public propertyMovies
MoviesRepository
Public propertyMoviesCategory
MoviesCategoryRepository
Top
Methods
  NameDescription
Public methodCommit
Save changes across all the repositories in one transaction
Public methodDispose
Dispose the DBContext of the UnitOfWork
Top
Fields
See Also