优化仓储、Service

This commit is contained in:
不做码农
2022-09-21 21:43:05 +08:00
parent 918e0b092d
commit 241fe55633
25 changed files with 286 additions and 332 deletions

View File

@@ -1,6 +1,5 @@
using Infrastructure.Attribute;
using ZR.Model.System;
using ZR.Repository;
namespace ZR.Service.System
{
@@ -10,17 +9,11 @@ namespace ZR.Service.System
[AppService(ServiceType = typeof(ISysConfigService), ServiceLifetime = LifeTime.Transient)]
public class SysConfigService : BaseService<SysConfig>, ISysConfigService
{
private readonly SysConfigRepository _SysConfigrepository;
public SysConfigService(SysConfigRepository repository)
{
_SysConfigrepository = repository;
}
#region
public SysConfig GetSysConfigByKey(string key)
{
return _SysConfigrepository.Queryable().First(f => f.ConfigKey == key);
return Queryable().First(f => f.ConfigKey == key);
}
#endregion