From 79cc2dd7406ccabf1eb2d3e198ef9aae91022dee Mon Sep 17 00:00:00 2001
From: Taha FADL <24903274+Taha5492@users.noreply.github.com>
Date: Wed, 15 Jul 2020 16:21:43 +0200
Subject: [PATCH 1/3] Improved the Comments in Controller
---
.../Controllers/CategoriesController.cs | 32 +++++++++++++++--
.../Controllers/ProjectsController.cs | 31 ++++++++++++++--
.../Controllers/SprintsController.cs | 33 +++++++++++++++--
.../Controllers/StatusController.cs | 30 ++++++++++++++--
ScrumTaskboard/Controllers/TasksController.cs | 35 ++++++++++++++++--
ScrumTaskboard/Controllers/UsersController.cs | 30 ++++++++++++++--
.../Controllers/UserstoriesController.cs | 36 +++++++++++++++++--
7 files changed, 213 insertions(+), 14 deletions(-)
diff --git a/ScrumTaskboard/Controllers/CategoriesController.cs b/ScrumTaskboard/Controllers/CategoriesController.cs
index 0790e30..8069d37 100644
--- a/ScrumTaskboard/Controllers/CategoriesController.cs
+++ b/ScrumTaskboard/Controllers/CategoriesController.cs
@@ -26,7 +26,14 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/category
- #nullable enable
+ ///
+ /// Retrieve all Categories in DB.
+ ///
+ ///
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetCategory([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery] string? color)
{
@@ -48,9 +55,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable disable
+#nullable disable
// GET: api/category/1
+ ///
+ /// Retrieve the Category by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetCategory(int id)
{
@@ -65,6 +77,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/category/1
+ ///
+ /// Update the Category identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutCategory(int id, ScrumCategory category)
{
@@ -99,6 +117,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/category
+ ///
+ /// Create a new Category.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostCategory(ScrumCategory category)
{
@@ -110,6 +133,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/category/1
+ ///
+ /// Delete a Category identified by it's ID.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteCategory(int id)
{
diff --git a/ScrumTaskboard/Controllers/ProjectsController.cs b/ScrumTaskboard/Controllers/ProjectsController.cs
index 5c488f4..08c7f63 100644
--- a/ScrumTaskboard/Controllers/ProjectsController.cs
+++ b/ScrumTaskboard/Controllers/ProjectsController.cs
@@ -26,7 +26,13 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/projects
- #nullable enable
+ ///
+ /// Retrieve all Projects in DB.
+ ///
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetProject([FromQuery]string? title, [FromQuery]bool? isprivate)
{
@@ -43,9 +49,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable disable
+#nullable disable
// GET: api/projects/5
+ ///
+ /// Retrieve the Project by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetProjects(int id)
{
@@ -60,6 +71,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/Project/5
+ ///
+ /// Update the Project identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutProject(int id, ScrumProject projects)
{
@@ -94,6 +111,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/Project
+ ///
+ /// Create a new Project.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostProject(ScrumProject projects)
{
@@ -105,6 +127,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/Project/5
+ ///
+ /// Delete a Project identified by it's ID.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteProject(int id)
{
diff --git a/ScrumTaskboard/Controllers/SprintsController.cs b/ScrumTaskboard/Controllers/SprintsController.cs
index 919633f..22af4be 100644
--- a/ScrumTaskboard/Controllers/SprintsController.cs
+++ b/ScrumTaskboard/Controllers/SprintsController.cs
@@ -26,7 +26,15 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/sprint
- #nullable enable
+ ///
+ /// Retrieve all Sprints in DB.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetSprint([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery]DateTime? startDate, [FromQuery]DateTime? endDate)
{
@@ -51,9 +59,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable disable
+#nullable disable
// GET: api/sprint/5
+ ///
+ /// Retrieve the Sprint by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetSprint(int id)
{
@@ -68,6 +81,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/sprint/5
+ ///
+ /// Update the Sprint identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutSprint(int id, ScrumSprint sprint)
{
@@ -102,6 +121,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/Sprint
+ ///
+ /// Create a new Sprint.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostSprint(ScrumSprint sprint)
{
@@ -113,6 +137,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/Sprint/5
+ ///
+ /// Delete a Sprint identified by it's ID.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteSprint(int id)
{
diff --git a/ScrumTaskboard/Controllers/StatusController.cs b/ScrumTaskboard/Controllers/StatusController.cs
index 08830ac..046f16e 100644
--- a/ScrumTaskboard/Controllers/StatusController.cs
+++ b/ScrumTaskboard/Controllers/StatusController.cs
@@ -25,7 +25,12 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/status
- #nullable enable
+ ///
+ /// Retrieve all Status in DB.
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetStatus([FromQuery]string? title)
{
@@ -38,9 +43,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable enable
+#nullable enable
// GET: api/status/1
+ ///
+ /// Retrieve the Status by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetStatus(int id)
{
@@ -55,6 +65,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/status/1
+ ///
+ /// Update the Status identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutStatus(int id, ScrumStatus userstory)
{
@@ -89,6 +105,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/status
+ ///
+ /// Create a new Status.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostTask(ScrumStatus userstory)
{
@@ -100,6 +121,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/status/1
+ ///
+ /// Create a new Status.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteStatus(int id)
{
diff --git a/ScrumTaskboard/Controllers/TasksController.cs b/ScrumTaskboard/Controllers/TasksController.cs
index 91e9794..75e2084 100644
--- a/ScrumTaskboard/Controllers/TasksController.cs
+++ b/ScrumTaskboard/Controllers/TasksController.cs
@@ -26,7 +26,17 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/tasks
- #nullable enable
+ ///
+ /// Retrieve all Tasks in DB.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetTasks([FromQuery]string? title, [FromQuery]int? userstoryid, [FromQuery]int? statusid, [FromQuery]int? assignedtoid, [FromQuery]int? projectid, [FromQuery]ScrumPrio? priority)
{
@@ -60,9 +70,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable disable
+#nullable disable
// GET: api/tasks/5
+ ///
+ /// Retrieve the Task by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetTask(int id)
{
@@ -77,6 +92,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/tasks/5
+ ///
+ /// Update the Task identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutTask(int id, ScrumTask task)
{
@@ -111,6 +132,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/tasks
+ ///
+ /// Create a new Task.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostTask(ScrumTask task)
{
@@ -122,6 +148,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/tasks/5
+ ///
+ /// Delete a Task identified by it's ID.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteTask(int id)
{
diff --git a/ScrumTaskboard/Controllers/UsersController.cs b/ScrumTaskboard/Controllers/UsersController.cs
index 014ddfb..5c210a2 100644
--- a/ScrumTaskboard/Controllers/UsersController.cs
+++ b/ScrumTaskboard/Controllers/UsersController.cs
@@ -25,7 +25,12 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/sprint
- #nullable enable
+ ///
+ /// Retrieve all Users in DB.
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetUser([FromQuery]string? name)
{
@@ -37,9 +42,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable disable
+#nullable disable
// GET: api/sprint/5
+ ///
+ /// Retrieve the User by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetUser(int id)
{
@@ -54,6 +64,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/sprint/5
+ ///
+ /// Update the User identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutUser(int id, ScrumUser sprint)
{
@@ -88,6 +104,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/User
+ ///
+ /// Create a new User.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostUser(ScrumUser sprint)
{
@@ -99,6 +120,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/User/5
+ ///
+ /// Delete a User identified by it's ID.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteUser(int id)
{
diff --git a/ScrumTaskboard/Controllers/UserstoriesController.cs b/ScrumTaskboard/Controllers/UserstoriesController.cs
index 898216e..16806f9 100644
--- a/ScrumTaskboard/Controllers/UserstoriesController.cs
+++ b/ScrumTaskboard/Controllers/UserstoriesController.cs
@@ -26,7 +26,18 @@ namespace ScrumTaskboard.Controllers
}
// GET: api/userstories
- #nullable enable
+ ///
+ /// Retrieve all Userstories in DB.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+#nullable enable
[HttpGet]
public async Task>> GetUserstory([FromQuery]string? title, [FromQuery]int? statusid, [FromQuery]int? categoryid, [FromQuery]int? createdbyid, [FromQuery]int? projectid, [FromQuery]int? sprintid, [FromQuery]ScrumPrio? priority)
{
@@ -64,9 +75,14 @@ namespace ScrumTaskboard.Controllers
return await filtered.ToListAsync();
}
- #nullable disable
+#nullable disable
// GET: api/userstories/1
+ ///
+ /// Retrieve the Userstory by it's ID.
+ ///
+ ///
+ ///
[HttpGet("{id}")]
public async Task> GetUserstory(int id)
{
@@ -81,6 +97,12 @@ namespace ScrumTaskboard.Controllers
}
// PUT: api/userstories/1
+ ///
+ /// Update the Userstory identified by it's ID.
+ ///
+ ///
+ ///
+ ///
[HttpPut("{id}")]
public async Task PutUserstory(int id, ScrumUserstory userstory)
{
@@ -115,6 +137,11 @@ namespace ScrumTaskboard.Controllers
}
// POST: api/userstories
+ ///
+ /// Create a new Userstory.
+ ///
+ ///
+ ///
[HttpPost]
public async Task> PostTask(ScrumUserstory userstory)
{
@@ -126,6 +153,11 @@ namespace ScrumTaskboard.Controllers
}
// DELETE: api/userstories/1
+ ///
+ /// Delete a Userstory identified by it's ID.
+ ///
+ ///
+ ///
[HttpDelete("{id}")]
public async Task> DeleteUserstory(int id)
{
From a5f23bcd9a01f16e45de5054ac5a63bcaa78b1b2 Mon Sep 17 00:00:00 2001
From: Taha FADL <24903274+Taha5492@users.noreply.github.com>
Date: Sun, 19 Jul 2020 13:09:48 +0200
Subject: [PATCH 2/3] more Improved Comments in Controller
---
.../Controllers/CategoriesController.cs | 27 +++++++-------
.../Controllers/ProjectsController.cs | 25 ++++++-------
.../Controllers/SprintsController.cs | 29 +++++++--------
.../Controllers/StatusController.cs | 23 ++++++------
ScrumTaskboard/Controllers/TasksController.cs | 31 ++++++++--------
ScrumTaskboard/Controllers/UsersController.cs | 23 ++++++------
.../Controllers/UserstoriesController.cs | 35 ++++++++++---------
7 files changed, 100 insertions(+), 93 deletions(-)
diff --git a/ScrumTaskboard/Controllers/CategoriesController.cs b/ScrumTaskboard/Controllers/CategoriesController.cs
index 8069d37..520b977 100644
--- a/ScrumTaskboard/Controllers/CategoriesController.cs
+++ b/ScrumTaskboard/Controllers/CategoriesController.cs
@@ -28,11 +28,12 @@ namespace ScrumTaskboard.Controllers
// GET: api/category
///
/// Retrieve all Categories in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
- ///
- ///
+ /// string value
+ /// ID of created Project
+ /// string value
+ /// JSON list of all matching Categories
#nullable enable
[HttpGet]
public async Task>> GetCategory([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery] string? color)
@@ -61,8 +62,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the Category by it's ID.
///
- ///
- ///
+ /// ID of searched Category
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetCategory(int id)
{
@@ -80,9 +81,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Category identified by it's ID.
///
- ///
- ///
- ///
+ /// To edit Category's ID
+ /// modified Category
+ /// ???????
[HttpPut("{id}")]
public async Task PutCategory(int id, ScrumCategory category)
{
@@ -120,8 +121,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Category.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostCategory(ScrumCategory category)
{
@@ -136,8 +137,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Category identified by it's ID.
///
- ///
- ///
+ /// To delete Category's ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteCategory(int id)
{
diff --git a/ScrumTaskboard/Controllers/ProjectsController.cs b/ScrumTaskboard/Controllers/ProjectsController.cs
index 08c7f63..5cf06c7 100644
--- a/ScrumTaskboard/Controllers/ProjectsController.cs
+++ b/ScrumTaskboard/Controllers/ProjectsController.cs
@@ -28,10 +28,11 @@ namespace ScrumTaskboard.Controllers
// GET: api/projects
///
/// Retrieve all Projects in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
- ///
+ /// string value
+ /// boolean value
+ /// JSON list of all matching Projects
#nullable enable
[HttpGet]
public async Task>> GetProject([FromQuery]string? title, [FromQuery]bool? isprivate)
@@ -55,8 +56,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the Project by it's ID.
///
- ///
- ///
+ /// ID of searched Project
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetProjects(int id)
{
@@ -74,9 +75,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Project identified by it's ID.
///
- ///
- ///
- ///
+ /// To edit Project's ID
+ /// modified Project
+ /// ???????
[HttpPut("{id}")]
public async Task PutProject(int id, ScrumProject projects)
{
@@ -114,8 +115,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Project.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostProject(ScrumProject projects)
{
@@ -130,8 +131,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Project identified by it's ID.
///
- ///
- ///
+ /// To delete Project's ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteProject(int id)
{
diff --git a/ScrumTaskboard/Controllers/SprintsController.cs b/ScrumTaskboard/Controllers/SprintsController.cs
index 22af4be..4987218 100644
--- a/ScrumTaskboard/Controllers/SprintsController.cs
+++ b/ScrumTaskboard/Controllers/SprintsController.cs
@@ -28,12 +28,13 @@ namespace ScrumTaskboard.Controllers
// GET: api/sprint
///
/// Retrieve all Sprints in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
- ///
- ///
- ///
+ /// string value
+ /// ID of created Project
+ /// DateTime value
+ /// DateTime value
+ /// JSON list of all matching Sprints
#nullable enable
[HttpGet]
public async Task>> GetSprint([FromQuery]string? title, [FromQuery]int? projectid, [FromQuery]DateTime? startDate, [FromQuery]DateTime? endDate)
@@ -65,8 +66,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the Sprint by it's ID.
///
- ///
- ///
+ /// ID of searched Sprint
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetSprint(int id)
{
@@ -84,9 +85,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Sprint identified by it's ID.
///
- ///
- ///
- ///
+ /// To edit Sprint's ID
+ /// modified Sprint
+ /// ???????
[HttpPut("{id}")]
public async Task PutSprint(int id, ScrumSprint sprint)
{
@@ -124,8 +125,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Sprint.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostSprint(ScrumSprint sprint)
{
@@ -140,8 +141,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Sprint identified by it's ID.
///
- ///
- ///
+ /// To delete Sprint's ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteSprint(int id)
{
diff --git a/ScrumTaskboard/Controllers/StatusController.cs b/ScrumTaskboard/Controllers/StatusController.cs
index 046f16e..75552cb 100644
--- a/ScrumTaskboard/Controllers/StatusController.cs
+++ b/ScrumTaskboard/Controllers/StatusController.cs
@@ -27,9 +27,10 @@ namespace ScrumTaskboard.Controllers
// GET: api/status
///
/// Retrieve all Status in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
+ /// string value
+ /// JSON list of all matching status
#nullable enable
[HttpGet]
public async Task>> GetStatus([FromQuery]string? title)
@@ -49,8 +50,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the Status by it's ID.
///
- ///
- ///
+ /// ID of searched Status
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetStatus(int id)
{
@@ -68,9 +69,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Status identified by it's ID.
///
- ///
- ///
- ///
+ /// To edit Status' ID
+ /// modified Userstory
+ /// ???????
[HttpPut("{id}")]
public async Task PutStatus(int id, ScrumStatus userstory)
{
@@ -108,8 +109,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Status.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostTask(ScrumStatus userstory)
{
@@ -124,8 +125,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Status.
///
- ///
- ///
+ /// To delete Status' ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteStatus(int id)
{
diff --git a/ScrumTaskboard/Controllers/TasksController.cs b/ScrumTaskboard/Controllers/TasksController.cs
index 75e2084..29c79dd 100644
--- a/ScrumTaskboard/Controllers/TasksController.cs
+++ b/ScrumTaskboard/Controllers/TasksController.cs
@@ -28,14 +28,15 @@ namespace ScrumTaskboard.Controllers
// GET: api/tasks
///
/// Retrieve all Tasks in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
+ /// string value
+ /// ID of created Userstory
+ /// ID of created Status
+ /// ID of the Assignedto
+ /// ID of created Project
+ /// enum value
+ /// JSON list of all matching Tasks
#nullable enable
[HttpGet]
public async Task>> GetTasks([FromQuery]string? title, [FromQuery]int? userstoryid, [FromQuery]int? statusid, [FromQuery]int? assignedtoid, [FromQuery]int? projectid, [FromQuery]ScrumPrio? priority)
@@ -76,8 +77,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the Task by it's ID.
///
- ///
- ///
+ /// ID of searched Task
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetTask(int id)
{
@@ -95,8 +96,8 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Task identified by it's ID.
///
- ///
- ///
+ /// To edit Task's ID
+ /// modified Task
///
[HttpPut("{id}")]
public async Task PutTask(int id, ScrumTask task)
@@ -135,8 +136,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Task.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostTask(ScrumTask task)
{
@@ -151,8 +152,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Task identified by it's ID.
///
- ///
- ///
+ /// To delete Task's ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteTask(int id)
{
diff --git a/ScrumTaskboard/Controllers/UsersController.cs b/ScrumTaskboard/Controllers/UsersController.cs
index 5c210a2..bbf5219 100644
--- a/ScrumTaskboard/Controllers/UsersController.cs
+++ b/ScrumTaskboard/Controllers/UsersController.cs
@@ -27,9 +27,10 @@ namespace ScrumTaskboard.Controllers
// GET: api/sprint
///
/// Retrieve all Users in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
+ /// string value
+ /// JSON list of all matching Users
#nullable enable
[HttpGet]
public async Task>> GetUser([FromQuery]string? name)
@@ -48,8 +49,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the User by it's ID.
///
- ///
- ///
+ /// ID of searched User
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetUser(int id)
{
@@ -67,9 +68,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the User identified by it's ID.
///
- ///
- ///
- ///
+ /// To edit User's ID
+ /// modified Sprint
+ /// ???????
[HttpPut("{id}")]
public async Task PutUser(int id, ScrumUser sprint)
{
@@ -107,8 +108,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new User.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostUser(ScrumUser sprint)
{
@@ -123,8 +124,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a User identified by it's ID.
///
- ///
- ///
+ /// To delete User's ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteUser(int id)
{
diff --git a/ScrumTaskboard/Controllers/UserstoriesController.cs b/ScrumTaskboard/Controllers/UserstoriesController.cs
index 16806f9..a826fdb 100644
--- a/ScrumTaskboard/Controllers/UserstoriesController.cs
+++ b/ScrumTaskboard/Controllers/UserstoriesController.cs
@@ -28,15 +28,16 @@ namespace ScrumTaskboard.Controllers
// GET: api/userstories
///
/// Retrieve all Userstories in DB.
+ /// Result can be filtered using the Params.
///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
- ///
+ /// string value
+ /// ID of created Status
+ /// ID of created Category
+ /// ID of the Author
+ /// ID of created Project
+ /// ID of created Project
+ /// enum value
+ /// JSON list of all matching Userstories
#nullable enable
[HttpGet]
public async Task>> GetUserstory([FromQuery]string? title, [FromQuery]int? statusid, [FromQuery]int? categoryid, [FromQuery]int? createdbyid, [FromQuery]int? projectid, [FromQuery]int? sprintid, [FromQuery]ScrumPrio? priority)
@@ -81,8 +82,8 @@ namespace ScrumTaskboard.Controllers
///
/// Retrieve the Userstory by it's ID.
///
- ///
- ///
+ /// ID of searched Userstory
+ /// JSON object
[HttpGet("{id}")]
public async Task> GetUserstory(int id)
{
@@ -100,9 +101,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Userstory identified by it's ID.
///
- ///
- ///
- ///
+ /// To edit Userstory's ID
+ /// modified Userstory
+ /// ???????
[HttpPut("{id}")]
public async Task PutUserstory(int id, ScrumUserstory userstory)
{
@@ -140,8 +141,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Userstory.
///
- ///
- ///
+ /// ???????
+ /// ???????
[HttpPost]
public async Task> PostTask(ScrumUserstory userstory)
{
@@ -156,8 +157,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Userstory identified by it's ID.
///
- ///
- ///
+ /// To delete Userstory's ID
+ /// ???????
[HttpDelete("{id}")]
public async Task> DeleteUserstory(int id)
{
From 9dbe93b6e462abe47a46c205aab8ae4ae6fec0e6 Mon Sep 17 00:00:00 2001
From: Taha FADL <24903274+Taha5492@users.noreply.github.com>
Date: Sun, 19 Jul 2020 17:46:41 +0200
Subject: [PATCH 3/3] edit Comments in Controller
---
ScrumTaskboard/Controllers/CategoriesController.cs | 12 ++++++------
ScrumTaskboard/Controllers/ProjectsController.cs | 12 ++++++------
ScrumTaskboard/Controllers/SprintsController.cs | 12 ++++++------
ScrumTaskboard/Controllers/StatusController.cs | 12 ++++++------
ScrumTaskboard/Controllers/TasksController.cs | 12 ++++++------
ScrumTaskboard/Controllers/UsersController.cs | 12 ++++++------
ScrumTaskboard/Controllers/UserstoriesController.cs | 12 ++++++------
7 files changed, 42 insertions(+), 42 deletions(-)
diff --git a/ScrumTaskboard/Controllers/CategoriesController.cs b/ScrumTaskboard/Controllers/CategoriesController.cs
index 520b977..eef87be 100644
--- a/ScrumTaskboard/Controllers/CategoriesController.cs
+++ b/ScrumTaskboard/Controllers/CategoriesController.cs
@@ -81,9 +81,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Category identified by it's ID.
///
- /// To edit Category's ID
+ /// to edit Category's ID
/// modified Category
- /// ???????
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutCategory(int id, ScrumCategory category)
{
@@ -121,8 +121,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Category.
///
- /// ???????
- /// ???????
+ /// new Category
+ /// the proper status code
[HttpPost]
public async Task> PostCategory(ScrumCategory category)
{
@@ -137,8 +137,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Category identified by it's ID.
///
- /// To delete Category's ID
- /// ???????
+ /// to delete Category's ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteCategory(int id)
{
diff --git a/ScrumTaskboard/Controllers/ProjectsController.cs b/ScrumTaskboard/Controllers/ProjectsController.cs
index 5cf06c7..d57f637 100644
--- a/ScrumTaskboard/Controllers/ProjectsController.cs
+++ b/ScrumTaskboard/Controllers/ProjectsController.cs
@@ -75,9 +75,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Project identified by it's ID.
///
- /// To edit Project's ID
+ /// to edit Project's ID
/// modified Project
- /// ???????
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutProject(int id, ScrumProject projects)
{
@@ -115,8 +115,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Project.
///
- /// ???????
- /// ???????
+ /// new Project
+ /// the proper status code
[HttpPost]
public async Task> PostProject(ScrumProject projects)
{
@@ -131,8 +131,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Project identified by it's ID.
///
- /// To delete Project's ID
- /// ???????
+ /// to delete Project's ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteProject(int id)
{
diff --git a/ScrumTaskboard/Controllers/SprintsController.cs b/ScrumTaskboard/Controllers/SprintsController.cs
index 4987218..26eaba8 100644
--- a/ScrumTaskboard/Controllers/SprintsController.cs
+++ b/ScrumTaskboard/Controllers/SprintsController.cs
@@ -85,9 +85,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Sprint identified by it's ID.
///
- /// To edit Sprint's ID
+ /// to edit Sprint's ID
/// modified Sprint
- /// ???????
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutSprint(int id, ScrumSprint sprint)
{
@@ -125,8 +125,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Sprint.
///
- /// ???????
- /// ???????
+ /// new Sprint
+ /// the proper status code
[HttpPost]
public async Task> PostSprint(ScrumSprint sprint)
{
@@ -141,8 +141,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Sprint identified by it's ID.
///
- /// To delete Sprint's ID
- /// ???????
+ /// to delete Sprint's ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteSprint(int id)
{
diff --git a/ScrumTaskboard/Controllers/StatusController.cs b/ScrumTaskboard/Controllers/StatusController.cs
index 75552cb..926347b 100644
--- a/ScrumTaskboard/Controllers/StatusController.cs
+++ b/ScrumTaskboard/Controllers/StatusController.cs
@@ -69,9 +69,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Status identified by it's ID.
///
- /// To edit Status' ID
+ /// to edit Status' ID
/// modified Userstory
- /// ???????
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutStatus(int id, ScrumStatus userstory)
{
@@ -109,8 +109,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Status.
///
- /// ???????
- /// ???????
+ /// new Userstory
+ /// the proper status code
[HttpPost]
public async Task> PostTask(ScrumStatus userstory)
{
@@ -125,8 +125,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Status.
///
- /// To delete Status' ID
- /// ???????
+ /// to delete Status' ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteStatus(int id)
{
diff --git a/ScrumTaskboard/Controllers/TasksController.cs b/ScrumTaskboard/Controllers/TasksController.cs
index 29c79dd..392c680 100644
--- a/ScrumTaskboard/Controllers/TasksController.cs
+++ b/ScrumTaskboard/Controllers/TasksController.cs
@@ -96,9 +96,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Task identified by it's ID.
///
- /// To edit Task's ID
+ /// to edit Task's ID
/// modified Task
- ///
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutTask(int id, ScrumTask task)
{
@@ -136,8 +136,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Task.
///
- /// ???????
- /// ???????
+ /// new Task
+ /// the proper status code
[HttpPost]
public async Task> PostTask(ScrumTask task)
{
@@ -152,8 +152,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Task identified by it's ID.
///
- /// To delete Task's ID
- /// ???????
+ /// to delete Task's ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteTask(int id)
{
diff --git a/ScrumTaskboard/Controllers/UsersController.cs b/ScrumTaskboard/Controllers/UsersController.cs
index bbf5219..284c7c2 100644
--- a/ScrumTaskboard/Controllers/UsersController.cs
+++ b/ScrumTaskboard/Controllers/UsersController.cs
@@ -68,9 +68,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the User identified by it's ID.
///
- /// To edit User's ID
+ /// to edit User's ID
/// modified Sprint
- /// ???????
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutUser(int id, ScrumUser sprint)
{
@@ -108,8 +108,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new User.
///
- /// ???????
- /// ???????
+ /// new Sprint
+ /// the proper status code
[HttpPost]
public async Task> PostUser(ScrumUser sprint)
{
@@ -124,8 +124,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a User identified by it's ID.
///
- /// To delete User's ID
- /// ???????
+ /// to delete User's ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteUser(int id)
{
diff --git a/ScrumTaskboard/Controllers/UserstoriesController.cs b/ScrumTaskboard/Controllers/UserstoriesController.cs
index a826fdb..65aff6b 100644
--- a/ScrumTaskboard/Controllers/UserstoriesController.cs
+++ b/ScrumTaskboard/Controllers/UserstoriesController.cs
@@ -101,9 +101,9 @@ namespace ScrumTaskboard.Controllers
///
/// Update the Userstory identified by it's ID.
///
- /// To edit Userstory's ID
+ /// to edit Userstory's ID
/// modified Userstory
- /// ???????
+ /// the proper status code
[HttpPut("{id}")]
public async Task PutUserstory(int id, ScrumUserstory userstory)
{
@@ -141,8 +141,8 @@ namespace ScrumTaskboard.Controllers
///
/// Create a new Userstory.
///
- /// ???????
- /// ???????
+ /// new Userstory
+ /// the proper status code
[HttpPost]
public async Task> PostTask(ScrumUserstory userstory)
{
@@ -157,8 +157,8 @@ namespace ScrumTaskboard.Controllers
///
/// Delete a Userstory identified by it's ID.
///
- /// To delete Userstory's ID
- /// ???????
+ /// to delete Userstory's ID
+ /// the proper status code
[HttpDelete("{id}")]
public async Task> DeleteUserstory(int id)
{