public void Update(InstagramUpdateRequest model, int userId)
 {
     _dataProvider.ExecuteNonQuery(
         "dbo.InstagramUpdate",
         (parameters) =>
     {
         parameters.AddWithValue("@UserId", userId);
         parameters.AddWithValue("@InstagramUsername", model.InstagramUsername);
         parameters.AddWithValue("@InstagramFollowers", model.InstagramFollowers);
         parameters.AddWithValue("@InstagramBio", model.InstagramBio);
         parameters.AddWithValue("@InstagramAvatar", model.InstagramAvatar);
         parameters.AddWithValue("@InstagramFollowing", model.InstagramFollowing);
         parameters.AddWithValue("@InstagramPosts", model.InstagramPosts);
         parameters.AddWithValue("@InstagramFullName", model.InstagramFullName);
     }
         );
 }
Exemple #2
0
        public ActionResult <SuccessResponse> Update(InstagramUpdateRequest model)
        {
            ActionResult result = null;
            int          userId = _authService.GetCurrentUserId();

            try
            {
                _instagramService.Update(model, userId);
                SuccessResponse response = new SuccessResponse();
                result = Ok200(response);
            }
            catch (Exception ex)
            {
                Logger.LogError(ex.ToString());

                result = StatusCode(500, ex.ToString());
            }
            return(result);
        }