Implementing non-crud queries

This commit is contained in:
TypoMustakes
2023-12-05 11:10:47 +01:00
parent a27ebbf0ae
commit ea7b11e03c

View File

@@ -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<Employee> WhoWorksInMaintainerTeam(int id)
{
return LogicServices.WhoWorksInMaintainerTeam(id);
}
[HttpGet("GetSubordinates/{id}")]
public IQueryable<Employee> GetSubordinates(int id)
{
return LogicServices.GetSubordinates(id);
}
[HttpGet("WhoUsesService")]
public IQueryable<Customer> WhoUsesService(int id)
{
return LogicServices.WhoUsesService(id);
}
[HttpGet("Employees")]
public IQueryable<Employee> ReadAllEmployees()
{