Example #1
0
        // GET api/userevents/5
        public ReturnValue Get(int id)
        {
            if (id < 0)
            {
                throw new HttpResponseException(HttpStatusCode.NotFound);
            }

            ReturnValue returnValue = new ReturnValue();

            try
            {
                ObjectParameter TotalCount = new ObjectParameter("TotalCount", typeof(int));
                returnValue.value = entity.UserEventGetList(id, TotalCount).ToList <UserEventGetList_Result>();

                returnValue.totalcount = (int)TotalCount.Value;
                returnValue.code       = 0;
                returnValue.msg        = "succes";
            }
            catch
            {
                throw new HttpResponseException(HttpStatusCode.InternalServerError);
            }

            return(returnValue);
        }