diff --git a/ComitivaEsperanca.API.Domain/Interfaces/Repositories/Entities/IClassifiedNewsRepository.cs b/ComitivaEsperanca.API.Domain/Interfaces/Repositories/Entities/IClassifiedNewsRepository.cs new file mode 100644 index 0000000..635f7be --- /dev/null +++ b/ComitivaEsperanca.API.Domain/Interfaces/Repositories/Entities/IClassifiedNewsRepository.cs @@ -0,0 +1,8 @@ +using ComitivaEsperanca.API.Domain.Entities; + +namespace ComitivaEsperanca.API.Domain.Interfaces.Repositories.Entities +{ + public interface IClassifiedNewsRepository : IBaseRepository + { + } +} diff --git a/ComitivaEsperanca.API.Domain/Interfaces/UnitOfWork/IUnitOfWork.cs b/ComitivaEsperanca.API.Domain/Interfaces/UnitOfWork/IUnitOfWork.cs index f962a2d..c7ac282 100644 --- a/ComitivaEsperanca.API.Domain/Interfaces/UnitOfWork/IUnitOfWork.cs +++ b/ComitivaEsperanca.API.Domain/Interfaces/UnitOfWork/IUnitOfWork.cs @@ -5,6 +5,7 @@ namespace ComitivaEsperanca.API.Domain.Interfaces.UnitOfWork public interface IUnitOfWork : IDisposable { INewsRepository NewsRepository { get;} + IClassifiedNewsRepository ClassifiedNewsRepository { get;} int Commit(); dynamic GetContext(); } diff --git a/ComitivaEsperanca.Data/Repositories/Entities/ClassifiedNewsRepository.cs b/ComitivaEsperanca.Data/Repositories/Entities/ClassifiedNewsRepository.cs new file mode 100644 index 0000000..1dc8800 --- /dev/null +++ b/ComitivaEsperanca.Data/Repositories/Entities/ClassifiedNewsRepository.cs @@ -0,0 +1,14 @@ +using ComitivaEsperanca.API.Data.Context; +using ComitivaEsperanca.API.Domain.Entities; +using ComitivaEsperanca.API.Domain.Interfaces.Repositories.Entities; + +namespace ComitivaEsperanca.API.Data.Repositories.Entities +{ + public class ClassifiedNewsRepository : BaseRepository, IClassifiedNewsRepository + { + public ClassifiedNewsRepository(CoreContext context) : base(context) + { + + } + } +} diff --git a/ComitivaEsperanca.Data/UnitOfWork/UnitOfWork.cs b/ComitivaEsperanca.Data/UnitOfWork/UnitOfWork.cs index 3875a05..2af9b60 100644 --- a/ComitivaEsperanca.Data/UnitOfWork/UnitOfWork.cs +++ b/ComitivaEsperanca.Data/UnitOfWork/UnitOfWork.cs @@ -11,11 +11,13 @@ public class UnitOfWork : IUnitOfWork private bool disposed = false; public INewsRepository NewsRepository { get; set; } + public IClassifiedNewsRepository ClassifiedNewsRepository { get; set; } public UnitOfWork(CoreContext context) { _context = context; this.NewsRepository = new NewsRepository(_context); + this.ClassifiedNewsRepository = new ClassifiedNewsRepository(_context); } protected virtual void Dispose(bool disposing)