Primera subida
This commit is contained in:
23
back/Application/Services/DireccionService.cs
Normal file
23
back/Application/Services/DireccionService.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user