using AutoMapper; using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using PARR.API.Contracts.V1; using PARR.API.Contracts.V1.Requests; using PARR.API.Contracts.V1.Requests.Queries; using PARR.API.Contracts.V1.Responses; using PARR.API.Contracts.V1.Responses.Base; using PARR.API.Controllers.V1.Base; using PARR.API.Extensions; using PARR.BLL.Helpers; using PARR.Constants; using PARR.DAL.Contracts; using PARR.DAL.DomainModels; using PARR.DAL.Models; using PARR.DAL.Services.Interfaces; namespace PARR.API.Controllers.V1 { public class TemplateController : BaseApiController { private readonly IMapper mapper; private readonly ITemplateService templateService; private readonly SettingsFromDb settingsFromDb; private readonly IRobotConfigurationService robotConfigurationService; public TemplateController( IMapper mapper, ITemplateService templateService, SettingsFromDb settingsFromDb, IRobotConfigurationService robotConfigurationService ) { this.mapper = mapper; this.templateService = templateService; this.settingsFromDb = settingsFromDb; this.robotConfigurationService = robotConfigurationService; } /// /// Получить список всех шаблонов постранично /// /// /// [HttpGet(ApiRoutes.Template.GetAll)] public async Task GetAll([FromQuery] PaginationQuery paginationQuery, [FromQuery] TemplateQuery filter) { var paginationFilter = mapper.Map(paginationQuery); IQueryable