aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ApartmentManager/HousingWebApi/Controllers/DefectsController.cs8
1 files changed, 8 insertions, 0 deletions
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<Defect> GetApartmentDefects(int id)
+ {
+ var defectlist = from defect in db.Defects
+ where (defect.ApartmentId == id)
+ select defect;
+ return defectlist;
+ }
// GET: api/Defects
public IQueryable<Defect> GetDefects()
{