//....// ============================================================================================= 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); }
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)); }