using AutoMapper; using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Yi.Framework.Model.Base; using Yi.Framework.Repository; namespace Yi.Framework.Service.Base.Crud { public abstract class ReadOnlyAppService : AbstractKeyReadOnlyAppService where TEntity : class, IEntity, new() { protected ReadOnlyAppService(IRepository repository, IMapper mapper) : base(repository, mapper) { } protected override async Task GetEntityByIdAsync(TKey id) { return await Repository.GetByIdAsync(id); } } }