public IHttpActionResult UpdateOrganisationProject(Guid id, Guid projId, Project proj) {
      if (!ModelState.IsValid)
        return badModelState();

      if (projId != proj.Id)
        return BadRequest("Bad Project Id");

      try {
        var allProjects = repo_.UpdateProject(id, proj);

        return Ok(allProjects);
      } catch (Exception e) {
        return BadRequest(e.Message);
      }
    } // UpdateOrganisationProject
Exemple #2
0
 protected override Project updateProject(ProjectOrganisation org, Project proj)
 {
     return(repo_.UpdateProject(org.Id, proj).Where(p => p.Name == proj.Name).Single());
 }