UnitOfWork.cs 764 B

12345678910111213141516171819202122232425262728293031323334
  1. // ======================================
  2. // Author: Ebenezer Monney
  3. // Email: info@ebenmonney.com
  4. // Copyright (c) 2017 www.ebenmonney.com
  5. //
  6. // ==> Gun4Hire: contact@ebenmonney.com
  7. // ======================================
  8. using System;
  9. using System.Collections.Generic;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using DAL.Repositories;
  14. using DAL.Repositories.Interfaces;
  15. namespace DAL
  16. {
  17. public class UnitOfWork : IUnitOfWork
  18. {
  19. readonly ApplicationDbContext _context;
  20. public UnitOfWork(ApplicationDbContext context )
  21. {
  22. _context = context;
  23. }
  24. public int SaveChanges()
  25. {
  26. return _context.SaveChanges();
  27. }
  28. }
  29. }