Beispiel #1
0
        public HttpResponseMessage GetMyReferrals([FromUri] int ID)
        {
            ItemsResponse <ReferralsJob> response = new ItemsResponse <ReferralsJob>();

            response.Items = _referralService.GetMyReferrals(ID);

            return(Request.CreateResponse(response));
        }
        public HttpResponseMessage GetMyReferrals([FromUri] int ID)
        {
            try
            {
                ItemsResponse <ReferralsJob> response = new ItemsResponse <ReferralsJob>();

                response.Items = _referralService.GetMyReferrals(ID);

                return(Request.CreateResponse(response));
            }
            catch (System.Exception ex)
            {
                ErrorLogService    svc   = new ErrorLogService();
                ErrorLogAddRequest error = new ErrorLogAddRequest();
                error.ErrorFunction = "Sabio.Web.Controllers.Api.GetDiversityById";
                error.ErrorMessage  = ex.Message;
                error.UserId        = UserService.UserSelect().PersonId;
                svc.ErrorLogInsert(error);
                return(Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }