Exemple #1
0
        public IHttpActionResult FollowUnfollow(FollowUserVM modelFollow)
        {
            StringBuilder          traceLog    = null;
            ServiceResponse <bool> objResponse = null;

            try
            {
                traceLog = new StringBuilder();
                traceLog.AppendLine("Start: FollowUnfollow() Request Data-:UserId-" + modelFollow.UserId + ",UserType-" + modelFollow.UserType + ",IsFollow-" + modelFollow.IsFollow);
                objResponse              = new ServiceResponse <bool>();
                objResponse.jsonData     = TeamBL.FollowUnfollow(modelFollow);
                objResponse.IsResultTrue = true;
                return(Ok(objResponse));
            }
            catch (Exception ex)
            {
                LogManager.LogManagerInstance.WriteErrorLog(ex);
                return(BadRequest(ex.Message));
            }
            finally
            {
                traceLog.AppendLine("End:FollowUnfollow() Response Result Status-" + objResponse.IsResultTrue + ",FollowUnfollow Datetime-" + DateTime.Now.ToLongDateString());
                LogManager.LogManagerInstance.WriteTraceLog(traceLog);
                traceLog = null;
            }
        }