コード例 #1
0
        public void Delete(CommentsUpdateRequest model, string userId)
        {
            DataProvider.ExecuteNonQuery(GetConnection, "dbo.Comments_DeleteById"
               , inputParamMapper: delegate(SqlParameterCollection paramCollection)
               {
                   paramCollection.AddWithValue("@Deleted", model.UpdateValue);
                   paramCollection.AddWithValue("@Id", model.Id);
                   paramCollection.AddWithValue("@UserId", userId);
               }

                   );
        }
コード例 #2
0
        public HttpResponseMessage UpdateVisibility(CommentsUpdateRequest model)
        {
            if (!ModelState.IsValid)
            {
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }
            string userId = _userService.GetCurrentUserId();

            SuccessResponse response = new SuccessResponse();

            _commentService.UpdateVisibility(model);

            return Request.CreateResponse(HttpStatusCode.OK, response);
        }
コード例 #3
0
        public void UpdateVisibility(CommentsUpdateRequest model)
        {
            DataProvider.ExecuteNonQuery(GetConnection, "dbo.Comments_UpdateVisibilityStatus"
               , inputParamMapper: delegate(SqlParameterCollection paramCollection)
               {
                   paramCollection.AddWithValue("@IsVisible", model.UpdateValue);
                   paramCollection.AddWithValue("@Id", model.Id);

               },
                   returnParameters: delegate(SqlParameterCollection param)
               {

               });
        }