auto.bus_api/Server/Services/IRouteManagementService.cs
cuqmbr 7cf3f34f28 refactor: change Route CRUD to perform only compound data manipulations
This removes enpoints where you can CRUD only RouteAddress database table and refines those where you can CRUD both Route and RouteAddress
2023-05-24 20:48:27 +03:00

25 lines
909 B
C#

using System.Dynamic;
using Microsoft.AspNetCore.Mvc;
using SharedModels.DataTransferObjects.Model;
using SharedModels.QueryParameters;
using SharedModels.QueryParameters.Objects;
namespace Server.Services;
public interface IRouteManagementService
{
Task<(bool isSucceed, IActionResult actionResult, RouteDto route)>
AddRoute(CreateRouteDto createRouteDto);
Task<(bool isSucceed, IActionResult actionResult, IEnumerable<ExpandoObject> routes, PagingMetadata<ExpandoObject> pagingMetadata)>
GetRoutes(RouteParameters parameters);
Task<(bool isSucceed, IActionResult actionResult, ExpandoObject route)>
GetRoute(int id, string? fields);
Task<(bool isSucceed, IActionResult actionResult, UpdateRouteDto route)>
UpdateRoute(int id, UpdateRouteDto updateRouteDto);
Task<(bool isSucceed, IActionResult actionResult)> DeleteRoute(int id);
}