Exemplo n.º 1
0
        public IHttpActionResult FollowUnfollowTeam(FollowUserVM modelFollow)
        {
            StringBuilder          traceLog    = null;
            ServiceResponse <bool> objResponse = null;

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