public HttpResponseMessage Employee(int id)
 {
     var model = repo.getMission(id);
     if (model == null)
     {
         return Request.CreateResponse(HttpStatusCode.NotFound);
     }
     else
     {
         var employee = model.employee;
         var view = new EmployeeView(employee);
         return Request.CreateResponse(HttpStatusCode.OK, view);
     }
 }
 public HttpResponseMessage GetLogin(string email, string password)
 {
     var model = repo.getEmployee(email, password);
     if (model == null)
     {
         return Request.CreateResponse(HttpStatusCode.NotFound);
     }
     else
     {
         var view = new EmployeeView(model);
         return Request.CreateResponse(HttpStatusCode.OK, view);
     }
 }
 public void Put(int id, EmployeeView view)
 {
     view.id = id;
     var model = view.getModel(repo);
     model.updated = DateTime.UtcNow;
     repo.update(model);
 }
 public HttpResponseMessage Get(int id)
 {
     var model = repo.getEmployee(id);
     if (model == null)
     {
         return Request.CreateResponse(HttpStatusCode.NotFound);
     }
     else
     {
         var view = new EmployeeView(model);
         return Request.CreateResponse(HttpStatusCode.OK, view);
     }
 }
        public HttpResponseMessage Post(EmployeeView view)
        {
            var model = view.getModel(repo);
            model.created = DateTime.UtcNow;
            model.updated = DateTime.UtcNow;
            model.fakeId = Guid.NewGuid();
            model = repo.createEmployee(model);
            view = new EmployeeView(model);

            var response = Request.CreateResponse<EmployeeView>(HttpStatusCode.Created, view);
            string uri = Url.Route(null, new { id = view.id });
            response.Headers.Location = new Uri(Request.RequestUri, uri);
            return response;
        }