コード例 #1
0
    public IHttpActionResult UpdateOrganisationLocation(Guid id, Guid locId, Location loc) {
      if (!ModelState.IsValid)
        return badModelState();

      if (locId != loc.Id)
        return BadRequest("Bad Location Id");

      try {
        var allLocs = repo_.UpdateLocation(id, loc);

        return Ok(allLocs);
      } catch (Exception e) {
        return BadRequest(e.Message);
      }
    } // UpdateOrganisationLocation
コード例 #2
0
 protected override Location updateLocation(ProjectOrganisation org, Location loc)
 {
     return(repo_.UpdateLocation(org.Id, loc).Where(l => l.Name == loc.Name).Single());
 }