From ea7b11e03c145f0070a5f3e1024ed7a064cc31b2 Mon Sep 17 00:00:00 2001 From: TypoMustakes Date: Tue, 5 Dec 2023 11:10:47 +0100 Subject: [PATCH] Implementing non-crud queries --- .../DatabaseController.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/WD7UVN_HFT_2023241.Endpoint/DatabaseController.cs b/WD7UVN_HFT_2023241.Endpoint/DatabaseController.cs index d7e3716..f738e3d 100644 --- a/WD7UVN_HFT_2023241.Endpoint/DatabaseController.cs +++ b/WD7UVN_HFT_2023241.Endpoint/DatabaseController.cs @@ -1,9 +1,7 @@ using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.ApplicationModels; using WD7UVN_HFT_2023241.Logic; using System.Linq; using WD7UVN_HFT_2023241.Models; -using System.Collections; namespace WD7UVN_HFT_2023241.Endpoint { @@ -18,6 +16,24 @@ namespace WD7UVN_HFT_2023241.Endpoint this.LogicServices = LogicServices; } + [HttpGet("WhoWorksInMaintainerTeam/{id}")] + public IQueryable WhoWorksInMaintainerTeam(int id) + { + return LogicServices.WhoWorksInMaintainerTeam(id); + } + + [HttpGet("GetSubordinates/{id}")] + public IQueryable GetSubordinates(int id) + { + return LogicServices.GetSubordinates(id); + } + + [HttpGet("WhoUsesService")] + public IQueryable WhoUsesService(int id) + { + return LogicServices.WhoUsesService(id); + } + [HttpGet("Employees")] public IQueryable ReadAllEmployees() {