예제 #1
0
        public IHttpActionResult JoinTeam(TeamVM objTeamInfo)
        {
            StringBuilder          traceLog    = null;
            ServiceResponse <bool> objResponse = null;

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