コード例 #1
0
        public HttpResponseMessage GetAll()
        {
            try
            {
                var profileEntities  = profileBusiness.GetAll().ToList();
                var ProfileViewModel = (from r in profileEntities select mapper.MapFromEntityToModel(r)).ToList();

                return(Request.CreateResponse(HttpStatusCode.OK, ProfileViewModel));
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
            }
        }