public void Edit(long scholorshipId, [FromBody] Extems.Admission.Entities.Scholorship scholorship) { if (scholorship == null) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed)); } try { this.ScholorshipRepository.Update(scholorship, scholorshipId); } catch (UnauthorizedException) { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.Forbidden)); } catch (DataAccessException ex) { throw new HttpResponseException(new HttpResponseMessage { Content = new StringContent(ex.Message), StatusCode = HttpStatusCode.InternalServerError }); } #if !DEBUG catch { throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.InternalServerError)); } #endif }
public void Last() { Extems.Admission.Entities.Scholorship scholorship = Fixture().GetLast(); Assert.NotNull(scholorship); }
public void Previous() { Extems.Admission.Entities.Scholorship scholorship = Fixture().GetPrevious(0); Assert.NotNull(scholorship); }