public async Task<IHttpActionResult> PutEmployee(int id, Employee employee)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != employee.Id)
            {
                return BadRequest();
            }

            db.Entry(employee).State = EntityState.Modified;

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!EmployeeExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }
 /// <summary>
 /// Converts the Entity to a sequence of values (an Array)
 /// </summary>
 /// <param name="e"></param>
 /// <returns></returns>
 private System.Collections.IEnumerable GetEntityAsEnumerable(Employee e)
 {
     yield return e.FirstName;
     yield return e.LastName;
     yield return e.Position;
     yield return e.Office;
     yield return e.StartDate;
     yield return e.Salary;
 }
 /// <summary>
 /// Provides the name of the Columns used in the Array
 /// </summary>
 /// <param name="e"></param>
 /// <returns></returns>
 private IEnumerable<string> GetEntityFieldNames(Employee e)
 {
     yield return nameof(e.FirstName);
     yield return nameof(e.LastName);
     yield return nameof(e.Position);
     yield return nameof(e.Office);
     yield return nameof(e.StartDate);
     yield return nameof(e.Salary);
 }
        public async Task<IHttpActionResult> PostEmployee(Employee employee)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.Employees.Add(employee);
            await db.SaveChangesAsync();

            return CreatedAtRoute("DefaultApi", new { id = employee.Id }, employee);
        }