Question: N 7 = 6) Closely review the C# WebAPI code given below and find all the errors in the code. You must clearly mention error

 N 7 = 6) Closely review the C# WebAPI code given

N 7 = 6) Closely review the C# WebAPI code given below and find all the errors in the code. You must clearly mention error line number, error detail and correct code to fix each error. 1 namespace WebAPIDemo.Controllers{ 2 public class EmployeesController : WebApiController{ 3 Employee [] employees = new Employee[] { 4 new Employee { ID = 1, Name = "Mark", JoiningDate = 5 DateTime.Parse(DateTime. Today.ToString()), Age = 30 }, 6 new Employee { ID = 2, Name = "Allan", JoiningDate = DateTime.Parse(DateTime. Today.ToString(), Age = 35 }, 8 new Employee { ID = 3, Name = "Johny", JoiningDate = 9 DateTime. Parsing (DateTime. Today.ToString()), Age = 21 } 10 }; 11 12 public IEnumerable (Employee) GetAllEmployees () { return employees; 14 } 15 16 public IHttpActionResponse Get Employee(int id) { 17 var employee = employees. FirstAndDefault((p) => p.ID == id); 18 if (employee == null) { 19 return NotFound(); 20 } return Okay(employee); 22 } 23 } 24 } 13 = 21

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!