HuanMengAdmin/admin-server/MiaoYu.Core/ApplicationServices/ApplicationService.cs
2024-07-19 02:05:38 +08:00

36 lines
758 B
C#

using HZY.Framework.DependencyInjection.Attributes;
namespace MiaoYu.Core.ApplicationServices;
/// <summary>
/// 服务父类
/// </summary>
[Component]
public class ApplicationService //: IScopedSelfDependency
{
}
/// <summary>
/// 服务父类
/// </summary>
/// <typeparam name="TRepository">仓储</typeparam>
public class ApplicationService<TRepository> : ApplicationService where TRepository : class
{
/// <summary>
/// 默认仓储
/// </summary>
protected readonly TRepository _defaultRepository;
/// <summary>
/// 服务父类
/// </summary>
/// <param name="defaultRepository"></param>
public ApplicationService(TRepository defaultRepository)
{
_defaultRepository = defaultRepository;
}
}