24 lines
696 B
C#
24 lines
696 B
C#
using AutoMapper;
|
|
using back.Entities.DTOs.Request;
|
|
using back.Entities;
|
|
using back.Infra;
|
|
using back.Application.Contracts.Persistence;
|
|
|
|
namespace back.Application.Services
|
|
{
|
|
public class DireccionService : GenericService<Direccion, DireccionRequestDto, DireccionUpdateRequestDto>
|
|
{
|
|
private readonly IAsyncRepository<Direccion> repo;
|
|
public DireccionService(IMapper mapper, IAsyncRepository<Direccion> _repo) : base(mapper, _repo)
|
|
{
|
|
repo = _repo;
|
|
}
|
|
|
|
public async Task<Direccion> AddOne(Direccion direccion)
|
|
{
|
|
await repo.AddAsync(direccion);
|
|
return direccion;
|
|
}
|
|
}
|
|
}
|