예제 #1
0
        //....// =============================================================================================

        public bool UpdateProfileMediaId(UserProfileMediaIdUpdateRequest model)
        {
            bool result = false;

            DataProvider.ExecuteNonQuery(GetConnection, "dbo.UserProfile_UpdateMediaId"
                                         , inputParamMapper : delegate(SqlParameterCollection paramCollection)
            {
                paramCollection.AddWithValue("@userId", model.UserId);
                paramCollection.AddWithValue("@mediaId", model.MediaId);

                result = true;
            });

            return(result);
        }
예제 #2
0
        public HttpResponseMessage UpdateProfileMediaId(UserProfileMediaIdUpdateRequest model)
        {
            if (!ModelState.IsValid)
            {
                return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState));
            }

            bool isSuccessful = _UserProfileService.UpdateProfileMediaId(model);

            ItemResponse <bool> response = new ItemResponse <bool> {
                Item = isSuccessful
            };

            return(Request.CreateResponse(HttpStatusCode.OK, response));
        }