Skip to content

mubassir-hasan/GenericRepositoryUnitOfWork

Repository files navigation

Generic Repository UnitOfWork

Ther are many repository out there. From many of them meets our requirement or not. So I have created a Complete Repository For any CRUD application.

Prerequisites

This project using MVC Core 2.1 along with visual studio Download it for here

Installing

After creating Project Add DBContext class If you don't know how to add DbContext:How to Cteate Application DbContext

Now flow the steps carefully

  1. Add Application DbContext
  2. Add IRepository.cs
  3. Add Repository.cs
  4. Add IUnitOfWork.cs
  5. Add UnitOfWork.cs

Repository Location

StartUp.cs

'''

 services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer( Configuration.GetConnectionString("DefaultConnection"))); services.AddScoped(typeof(IUnitOfWork), typeof(UnitOfWork)); 

'''

About

This is sample expample of repository pattern

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published