diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs new file mode 100644 index 0000000..58e64f0 --- /dev/null +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/SubOrdinateController.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Mvc; +using WD7UVN_HFT_2023241.Logic; +using System.Linq; +using WD7UVN_HFT_2023241.Models; + +namespace WD7UVN_HFT_2023241.Endpoint +{ + [ApiController] + [Route("api/GetSubordinates")] + public class GetSubordinatesController : ControllerBase + { + public ILogicServices LogicServices { get; set; } + + public GetSubordinatesController(ILogicServices LogicServices) + { + this.LogicServices = LogicServices; + } + + [HttpGet("{id}")] + public IQueryable GetSubordinates(int id) + { + return LogicServices.GetSubordinates(id); + } + } +} diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs new file mode 100644 index 0000000..4510c60 --- /dev/null +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoUsesServiceController.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Mvc; +using WD7UVN_HFT_2023241.Logic; +using System.Linq; +using WD7UVN_HFT_2023241.Models; + +namespace WD7UVN_HFT_2023241.Endpoint +{ + [ApiController] + [Route("api/WhoUsesService")] + public class WhoUsesServiceController : ControllerBase + { + public ILogicServices LogicServices { get; set; } + + public WhoUsesServiceController(ILogicServices LogicServices) + { + this.LogicServices = LogicServices; + } + + [HttpGet("{id}")] + public IQueryable WhoUsesService(int id) + { + return LogicServices.WhoUsesService(id); + } + } +} diff --git a/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs new file mode 100644 index 0000000..b2ab188 --- /dev/null +++ b/WD7UVN_HFT_2023241.Endpoint/Controllers/WhoWorksInMaintainerTeamController.cs @@ -0,0 +1,25 @@ +using Microsoft.AspNetCore.Mvc; +using WD7UVN_HFT_2023241.Logic; +using System.Linq; +using WD7UVN_HFT_2023241.Models; + +namespace WD7UVN_HFT_2023241.Endpoint +{ + [ApiController] + [Route("api/WhoWorksInMaintainerTeam")] + public class WhoWorksInMaintainerTeamController : ControllerBase + { + public ILogicServices LogicServices { get; set; } + + public WhoWorksInMaintainerTeamController(ILogicServices LogicServices) + { + this.LogicServices = LogicServices; + } + + [HttpGet("{id}")] + public IQueryable WhoWorksInMaintainerTeam(int id) + { + return LogicServices.WhoWorksInMaintainerTeam(id); + } + } +}