// DELETE api/employeeschedules/4
 public HttpResponseMessage Delete(int id)
 {
     var employeeSchedule = new EmployeeSchedule { EmployeeScheduleId = id };
       _db.EmployeeSchedule.Attach(employeeSchedule);
       var status=_db.EmployeeSchedule.Remove(employeeSchedule);
       _db.SaveChanges();
       if (status != null) return new HttpResponseMessage(HttpStatusCode.OK);
       throw new HttpResponseException(HttpStatusCode.NotFound);
 }
 // POST api/employeeSchedules
 public HttpResponseMessage Post([FromBody] EmployeeScheduleModel values)
 {
     var employeeId=_db.Employees.Where(e=>e.FirstName==values.EmployeeFirstName).Where(e=>e.LastName==values.EmployeeLastName).FirstOrDefault().EmployeeId;
      var timeSlotId=_db.TimeSlots.Where(ts=>ts.Start==values.TimeSlotStart).Where(ts=>ts.Duration==values.TimeSlotDuration).FirstOrDefault().TimeSlotId;
      var employeeSchedule = new EmployeeSchedule
      {
        EmployeeId = employeeId,
        TimeSlotId = timeSlotId
      };
      var es = _db.EmployeeSchedule.Add(employeeSchedule);
      _db.SaveChanges();
      if (es != null)
      {
     var msg = new HttpResponseMessage(HttpStatusCode.Created);
     msg.Headers.Location = new Uri(Request.RequestUri + "/" + employeeSchedule.EmployeeScheduleId.ToString());
     return msg;
      }
      else
      {
     var msg = new HttpResponseMessage(HttpStatusCode.BadRequest);
     return msg;
      }
 }