public IHttpActionResult Delete(string empId)
 {
     try
     {
         EmployeeViewModel emp = new EmployeeViewModel();
         emp.GetById(empId);
         emp.Delete();
         return Ok(emp.Lastname + " has been deleted");
     }
     catch (Exception e)
     {
         return BadRequest("Delete failed - " + e.Message);
     }
 }
 public IHttpActionResult Delete(string id)
 {
     try
     {
         EmployeeViewModel emp = new EmployeeViewModel();
         emp.GetById(id);
         if (emp.Delete())
             return Ok("Employee Deleted");
         else
             return BadRequest("Could not delete");
     }
     catch (Exception ex)
     {
         return BadRequest("Retrive failed - " + ex.Message);
     }
 }
        public void EmployeeVMCreateAndDeleteShouldReturnTrue()
        {
            bool deleteOK = false;
            EmployeeViewModel vm = new EmployeeViewModel();

            vm.DepartmentId = "56201963f748f2338c59a8c3"; // Sales Id
            vm.Email = "*****@*****.**";
            vm.Firstname = "Some";
            vm.Lastname = "Employee";
            vm.Phoneno = "(555)555-5555";
            vm.Title = "Mr.";
            vm.Create();

            if (vm.Id.Length == 24)
                deleteOK = vm.Delete();
            Assert.IsTrue(deleteOK);
        }