public IHttpActionResult CreateOrganisation(Organisation orgDetails) {
      if (!ModelState.IsValid)
        return BadRequest(ModelState);

      var newPo = repo_.Create(orgDetails);

      return Ok(newPo);
    } // CreateOrganisation
 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
示例#3
0
 protected override ProjectOrganisation createOrg()
 {
     return(repo_.Create(TestHelper.testOrg()));
 }