using YBEE.EQM.Core; namespace YBEE.EQM.Application; /// /// 高中选科组合管理服务 /// public class NceeCourseCombService : INceeCourseCombService, ITransient { private readonly IRepository _rep; public NceeCourseCombService(IRepository rep) { _rep = rep; } /// /// 根据ID获取高中选科组合 /// /// /// public async Task GetById(short id) { var item = await _rep.DetachedEntities.FirstOrDefaultAsync(x => x.Id == id); return item.Adapt(); } /// /// 获取所有高中选科组合 /// /// public async Task> GetAllList() { var items = await _rep.DetachedEntities.ProjectToType().ToListAsync(); return items; } }