Esempio n. 1
0
        public ReasonListApiModel GetLostReasons(string query = "", int pageSize = 0, int currentPage = 1)
        {
            var dbReasons = _dealRepository.GetLostReasons(query, pageSize, currentPage);
            var apiModel  = new ReasonListApiModel();

            apiModel.reasons = dbReasons.reasons.Select(c => new ReasonListApiModel.ReasonInfo()
            {
                id = c.ID, reason = c.Reason
            }).ToList();
            apiModel.pageInfo = dbReasons.p;
            return(apiModel);
        }