using Dpz.Core.Infrastructure.Entity;
namespace Dpz.Core.Service;
[Obsolete]
public abstract class BasicService<T>
where T : IBaseEntity, new()
{
protected IMapper Mapper => ServiceMapper.GetInstance().Mapper;
/// <summary>
/// Repository 实例
/// </summary>
protected IRepository<T> Repository { get; }
/// <summary>
/// 默认 Repository
/// </summary>
protected BasicService(string? connectionString)
{
Repository = new Repository<T>(connectionString);
}
protected BasicService(string? connectionString,string collectionName)
{
Repository = new Repository<T>(connectionString, collectionName);
}
}