using Govor.Core.Infrastructure.Extensions; using Govor.Core.Infrastructure.Validators; using Govor.Core.Models; using Govor.Core.Repositories.Messages; using Govor.Data.Repositories.Exceptions; using Microsoft.EntityFrameworkCore; namespace Govor.Data.Repositories; public class MessagesRepository : IMessagesRepository { private GovorDbContext _context; private IObjectValidator _validator; public MessagesRepository(GovorDbContext context, IObjectValidator validator) { _context = context; _validator = validator; } public async Task> GetAllAsync() { return await _context.Messages .AsNoTracking() .Where(x => true) .ToListOrThrowIfEmpty(new NotFoundException("Messages in Database not exists")); } public Task FindByIdAsync(Guid messageId) { throw new NotImplementedException(); } public Task> FindBySenderIdAsync(Guid senderId) { throw new NotImplementedException(); } public Task> FindByReceiverIdAsync(Guid receiverId) { throw new NotImplementedException(); } public Task> FindBySenderAndReceiverIdAsync(Guid senderId, Guid receiverId) { throw new NotImplementedException(); } public Task> FindBySentAtAsync(DateTime date) { throw new NotImplementedException(); } public void Add(Message message) { throw new NotImplementedException(); } public void Update(Message message) { throw new NotImplementedException(); } public void Delete(Guid messageId) { throw new NotImplementedException(); } public bool Exist(Message message) { throw new NotImplementedException(); } }