auto.bus_api/Server/Services/ICityManagementService.cs
cuqmbr 1ba0867390 refactor: optimize crud services
fix: data shaping removes fields from objects
2022-11-30 16:38:30 +02:00

18 lines
870 B
C#

using System.Dynamic;
using Microsoft.AspNetCore.Mvc;
using SharedModels.DataTransferObjects;
using SharedModels.QueryParameters;
using SharedModels.QueryParameters.Objects;
namespace Server.Services;
public interface ICityManagementService
{
Task<(bool isSucceed, IActionResult? actionResult, CityDto city)> AddCity(CreateCityDto createCityDto);
Task<(bool isSucceed, IActionResult? actionResult, IEnumerable<ExpandoObject> cities,
PagingMetadata<ExpandoObject> pagingMetadata)> GetCities(CityParameters parameters);
Task<(bool isSucceed, IActionResult? actionResult, ExpandoObject city)> GetCity(int id, string? fields);
Task<(bool isSucceed, IActionResult? actionResult, CityDto city)> UpdateCity(UpdateCityDto updateCityDto);
Task<(bool isSucceed, IActionResult? actionResult)> DeleteCity(int id);
Task<bool> IsCityExists(int id);
}