aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonatas Adamonis <dona0169@edu.easj.dk>2017-05-23 20:45:26 +0200
committerDonatas Adamonis <dona0169@edu.easj.dk>2017-05-23 20:45:26 +0200
commita7084d331d4a0701426fe5b76604ec1228f5e96f (patch)
tree1d740dd9bc319f6202cf8139ee913fa28d656b9f
parent2b9e3824f4a4579c45058fdd895d63ad2cea16ce (diff)
Apartment Defects controller
-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()
{