public IHttpActionResult AddProjectToOrganisation(Guid id, Project newProject) {
      if (!ModelState.IsValid)
        return BadRequest(ModelState);

      var projects = repo_.AddProject(id, newProject);

      return Ok(projects);
    } // AddProjectToOrganisation
 protected Project project()
 {
     using (var repo = new ProjectOrganisationRepository()) {
         var org = repo.Create(TestHelper.testOrg());
         org.RiskMaps.Add(riskMapId());
         repo.Update(org);
         var proj = TestHelper.newProject("CHUNKS");
         proj.RiskFramework = riskMapId();
         return(repo.AddProject(org.Id, proj).Where(s => s.Name == proj.Name).Single());
     }
 } // project
Exemplo n.º 3
0
        protected override Project createProject(ProjectOrganisation org, string name)
        {
            var proj = TestHelper.newProject(name);

            return(repo_.AddProject(org.Id, proj).Where(s => s.Name == proj.Name).Single());
        }