From a7084d331d4a0701426fe5b76604ec1228f5e96f Mon Sep 17 00:00:00 2001 From: Donatas Adamonis Date: Tue, 23 May 2017 20:45:26 +0200 Subject: Apartment Defects controller --- ApartmentManager/HousingWebApi/Controllers/DefectsController.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ApartmentManager/HousingWebApi/Controllers/DefectsController.cs b/ApartmentManager/HousingWebApi/Controllers/DefectsController.cs index c5f2909..c5bb0ac 100644 --- a/ApartmentManager/HousingWebApi/Controllers/DefectsController.cs +++ b/ApartmentManager/HousingWebApi/Controllers/DefectsController.cs @@ -16,6 +16,14 @@ namespace HousingWebApi.Controllers { private DataModel db = new DataModel(); + [Route("api/ApartmentDefects/{id}")] + public IQueryable GetApartmentDefects(int id) + { + var defectlist = from defect in db.Defects + where (defect.ApartmentId == id) + select defect; + return defectlist; + } // GET: api/Defects public IQueryable GetDefects() { -- cgit v1.2.3