All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 2m58s
59 lines
1.6 KiB
C#
59 lines
1.6 KiB
C#
using System.Reflection;
|
|
using Core.Interfaces;
|
|
using Domain.Entities;
|
|
using Models.Helpers;
|
|
using Models.Interfaces;
|
|
using Models.Models;
|
|
|
|
namespace Core.Services
|
|
{
|
|
public class CustomerService: ICustomerDom
|
|
{
|
|
#region Declaraciones y Constructor
|
|
private readonly IPhSCustomerRepository _repository;
|
|
|
|
public CustomerService(IPhSCustomerRepository customerRepository)
|
|
{
|
|
_repository = customerRepository ?? throw new ArgumentNullException(nameof(customerRepository));
|
|
}
|
|
#endregion
|
|
public Task<ECustomer> AddAsync(ECustomer entity)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<bool> DeleteAsync(int id)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public async Task<IEnumerable<ECustomer>> GetAllAsync()
|
|
{
|
|
try
|
|
{
|
|
return await _repository.GetAllAsync();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
var methodName = MethodBase.GetCurrentMethod()?.Name ?? "UnknownMethod";
|
|
throw new Exception($"{methodName} Message: {ex.Message}", ex);
|
|
}
|
|
}
|
|
|
|
public Task<ECustomer?> GetByIdAsync(int id)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<IEnumerable<ECustomer>> SearchAsync(string? name, string? email, string? document)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public Task<bool> UpdateAsync(ECustomer entity)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|
|
}
|