Example #1
0
        public IHttpActionResult TeamNutritions()
        {
            StringBuilder traceLog = null;
            ServiceResponse <List <NutritionVM> > objResponse = null;

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