12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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<List<LeaveTypeDto>> GetAllLeaveType()
- {
- var result = await _unitOfWork.LeaveType.GetAllAsync();
- var list = MapperObject.Mapper.Map<List<LeaveTypeDto>>(result.Item1);
- return list;
- }
- public async Task<List<OrderTypeDto>> GetAllOrderType()
- {
- var entity = await _unitOfWork.OrderType.GetAllAsync();
- var response = MapperObject.Mapper.Map<List<OrderTypeDto>>(entity.Item1);
- return response;
- }
- }
- }
|