网站首页 网站源码
website
站点相关全部源代码,隐藏了一些关于服务器的信息
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);
    }
}
loading