public void Edit(System.Guid registrationId, [FromBody] Frapid.Account.Entities.Registration registration)
        {
            if (registration == null)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.MethodNotAllowed));
            }

            try
            {
                this.RegistrationRepository.Update(registration, registrationId);
            }
            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
        }
Beispiel #2
0
 public void Last()
 {
     Frapid.Account.Entities.Registration registration = Fixture().GetLast();
     Assert.NotNull(registration);
 }
Beispiel #3
0
 public void Next()
 {
     Frapid.Account.Entities.Registration registration = Fixture().GetNext(new System.Guid());
     Assert.NotNull(registration);
 }