Public/tool_debug_other/BuildTemplate/ApplicationService/%placeholder%QueryService.cs
(完整代码) 1KBusing Domain.Entities;
using Domain.Repository;
using IApplicationService;
using IApplicationService.%ctxplaceholder%Service;
using IApplicationService.%ctxplaceholder%Service.Dtos.Output;
using IApplicationService.%ctxplaceholder%Service.Dtos.Input;
using Infrastructure.EfDataAccess;
using InfrastructureBase.AuthBase;
using InfrastructureBase.Object;
using Oxygen.Client.ServerProxyFactory.Interface;
using System.Threading.Tasks;
using IApplicationService.Base.AppQuery;
using System.Linq;
using InfrastructureBase.Data;
using Microsoft.EntityFrameworkCore;
namespace ApplicationService
{
public class %placeholder%QueryService : I%placeholder%QueryService
{
private readonly EfDbContext dbContext;
private readonly IStateManager stateManager;
public %placeholder%QueryService(EfDbContext dbContext, IStateManager stateManager)
{
this.dbContext = dbContext;
this.stateManager = stateManager;
}
[AuthenticationFilter]
public async Task<ApiResult> Get%placeholder%List(PageQueryInputBase input)
{
var query = from %placeholder% in dbContext.%placeholder% select new Get%placeholder%ListResponse() { };
var (Data, Total) = await QueryServiceHelper.PageQuery(query, input.Page, input.Limit);
return ApiResult.Ok(new PageQueryResonseBase<Get%placeholder%ListResponse>(Data, Total));
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
