12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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;
- namespace MTWorkHR.Application.Services
- {
- public class TeamService : BaseService<Team, TeamDto, TeamDto>, ITeamService
- {
- private readonly IUnitOfWork _unitOfWork;
- //private readonly AppSettingsConfiguration _configuration;
- //private readonly GlobalInfo _globalInfo;
- public TeamService(IUnitOfWork unitOfWork):base(unitOfWork)
- {
- _unitOfWork = unitOfWork;
- }
- public override async Task<TeamDto> GetById(long id)
- {
- var entity = await _unitOfWork.Team.GetByIdWithAllChildren(id);
- var response = MapperObject.Mapper.Map<TeamDto>(entity);
- return response;
- }
- //public override async Task<List<TeamDto>> GetAll()
- //{
- // var Teams = await _unitOfWork.Team.GetAllAsync();
- // var response = MapperObject.Mapper.Map<List<TeamDto>>(Teams);
- // return response;
- //}
- //public override async Task Delete(long id)
- //{
- // var entity = await _unitOfWork.Team.GetByIdAsync(id);
- // await _unitOfWork.Team.DeleteAsync(entity);
- //}
- }
- }
|