コード例 #1
0
ファイル: ActivityController.cs プロジェクト: NJThapa/60s
        public ResponseModelGetAll <Feedback> GetAllFeedBack(GetFeedBackList objGetFeedBackList)
        {
            try
            {
                ActivityProvider objActivityProvider            = new ActivityProvider(_context);
                List <Feedback>  objFeedbackList                = objActivityProvider.GetAllFeedBacks(objGetFeedBackList);
                ResponseModelGetAll <Feedback> objResponseModel = new ResponseModelGetAll <Feedback>
                {
                    StatusCode = 0,
                    Message    = "Successfully Retrieved",
                    ObjectList = objFeedbackList
                };

                return(objResponseModel);
            }
            catch (Exception ex)
            {
                ResponseModelGetAll <Feedback> objResponseModel = new ResponseModelGetAll <Feedback>
                {
                    StatusCode = 0,
                    Message    = ex.Message
                };

                return(objResponseModel);
            }
        }
コード例 #2
0
        public List <Feedback> GetAllFeedBacks(GetFeedBackList objGetFeedBackList)
        {
            List <Feedback> objListFeedBack = _context.Feedbacks.Where(x => x.DeletedOn == null && x.Type == objGetFeedBackList.Type && x.TypeId == objGetFeedBackList.TypeId).ToList();

            return(objListFeedBack);
        }