using Microsoft.AspNetCore.Mvc; using Txgy.RBS.DTO; using Txgy.RBS.Framework.Api; using Txgy.RBS.IServices; // For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 namespace Txgy.RBS.Server.WebApi.Controllers { [Route("api/[controller]/[action]")] [ApiController] public class StationsController : ControllerBase { private readonly IStationsService _stationsService; public StationsController(ILogger logger, IStationsService stationsService) { this._stationsService = stationsService; } [HttpPost] public ApiResult AddStations(StationsDTO stationsDTO) { return _stationsService.AddStations(stationsDTO); } [HttpDelete("{id}")] public ApiResult DeleteStations(int id) { return _stationsService.DeleteStations(id); } [HttpPost] public ApiResult UpdateStations(StationsDTO stationsDTO) { return _stationsService.UpdateStations(stationsDTO); } [HttpGet("{id}")] public StationsDTO GetStations(int id) { return _stationsService.GetStations(id); } [HttpGet] public List GetAllStationss() { return _stationsService.GetAllStations(); } } }