UnitOfWork Class
From Template MVC
Template Documentation
UnitOfWork Class |
Works to encampsulate all repositories, all the repositories will work with one DBContext to encapsulate all the changes in one transaction
Namespace: Template.Repository.Core
Assembly: Template.Repository (in Template.Repository.dll) Version: 1.0.0.0 (1.0.0.0)
C#
public class UnitOfWork : IUnitOfWork, IDisposable
The UnitOfWork type exposes the following members.
| Name | Description | |
|---|---|---|
| UnitOfWork |
Constructor of UnitOfWork
|
| Name | Description | |
|---|---|---|
| Movies |
MoviesRepository
| |
| MoviesCategory |
MoviesCategoryRepository
|
| Name | Description | |
|---|---|---|
| Commit |
Save changes across all the repositories in one transaction
| |
| Dispose |
Dispose the DBContext of the UnitOfWork
|
| Name | Description | |
|---|---|---|
| _entities | ||
| _Movies | ||
| _MoviesCateogory |