using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.WebUtilities; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using MTWorkHR.Application.Identity; using MTWorkHR.Application.Mapper; using MTWorkHR.Application.Models; using MTWorkHR.Core.Global; using MTWorkHR.Core.IRepositories; using MTWorkHR.Core.UnitOfWork; using MTWorkHR.Infrastructure.Entities; using MTWorkHR.Application.Services.Interfaces; using MTWorkHR.Core.Email; using MTWorkHR.Core.Entities; using MTWorkHR.Infrastructure.UnitOfWorks; using MTWorkHR.Core.IDto; using MTWorkHR.Infrastructure.Repositories; namespace MTWorkHR.Application.Services { public class LookupService : ILookupService { private readonly IUnitOfWork _unitOfWork; public LookupService(IUnitOfWork unitOfWork) { _unitOfWork = unitOfWork; } public async Task> GetAllLeaveType() { var result = await _unitOfWork.LeaveType.GetAllAsync(); var list = MapperObject.Mapper.Map>(result.Item1); return list; } public async Task> GetAllOrderType() { var entity = await _unitOfWork.OrderType.GetAllAsync(); var response = MapperObject.Mapper.Map>(entity.Item1); return response; } } }