Ejemplo n.º 1
0
        public void Edit(int scholorshipTypeId, [FromBody] Extems.Admission.Entities.ScholorshipType scholorshipType)
        {
            if (scholorshipType == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.ScholorshipTypeRepository.Update(scholorshipType, scholorshipTypeId);
            }
            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
        }
Ejemplo n.º 2
0
 public void Last()
 {
     Extems.Admission.Entities.ScholorshipType scholorshipType = Fixture().GetLast();
     Assert.NotNull(scholorshipType);
 }
Ejemplo n.º 3
0
 public void Previous()
 {
     Extems.Admission.Entities.ScholorshipType scholorshipType = Fixture().GetPrevious(0);
     Assert.NotNull(scholorshipType);
 }