MeetingService.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using Microsoft.AspNetCore.Identity;
  2. using Microsoft.AspNetCore.WebUtilities;
  3. using Microsoft.EntityFrameworkCore;
  4. using Microsoft.Extensions.Configuration;
  5. using MTWorkHR.Application.Identity;
  6. using MTWorkHR.Application.Mapper;
  7. using MTWorkHR.Application.Models;
  8. using MTWorkHR.Core.Global;
  9. using MTWorkHR.Core.IRepositories;
  10. using MTWorkHR.Core.UnitOfWork;
  11. using MTWorkHR.Infrastructure.Entities;
  12. using MTWorkHR.Application.Services.Interfaces;
  13. using MTWorkHR.Core.Email;
  14. using MTWorkHR.Core.Entities;
  15. using MTWorkHR.Infrastructure.UnitOfWorks;
  16. namespace MTWorkHR.Application.Services
  17. {
  18. public class MeetingService : BaseService<Meeting, MeetingDto, MeetingDto>, IMeetingService
  19. {
  20. private readonly IUnitOfWork _unitOfWork;
  21. public MeetingService(IUnitOfWork unitOfWork):base(unitOfWork)
  22. {
  23. _unitOfWork = unitOfWork;
  24. }
  25. public override async Task<MeetingDto> GetById(long id)
  26. {
  27. var entity = await _unitOfWork.Meeting.GetByIdWithAllChildren(id);
  28. var response = MapperObject.Mapper.Map<MeetingDto>(entity);
  29. return response;
  30. }
  31. //public override async Task<List<MeetingDto>> GetAll()
  32. //{
  33. // var Meetings = await _unitOfWork.Meeting.GetAllAsync();
  34. // var response = MapperObject.Mapper.Map<List<MeetingDto>>(Meetings);
  35. // return response;
  36. //}
  37. //public override async Task Delete(long id)
  38. //{
  39. // var entity = await _unitOfWork.Meeting.GetByIdAsync(id);
  40. // await _unitOfWork.Meeting.DeleteAsync(entity);
  41. //}
  42. }
  43. }