Example #1
0
        public async Task <IActionResult> GetSympotByBodyAreasId(int BodyId)
        {
            if (BodyId > 0)
            {
                var allSympot = await _diag.GetSympotByBodyAreasId(BodyId);

                //  var allBulletinMapped = _mapper.Map<TreatmentBulletinForReturnDto>(allBulletin);

                List <SymptomForReturnDto> allSymptoms = new List <SymptomForReturnDto>();
                foreach (var item in allSympot)
                {
                    var allMapped = new SymptomForReturnDto();
                    allMapped.SymptomName = item.SymptomName;
                    allMapped.SymptomId   = item.SymptomId;
                    allSymptoms.Add(allMapped);
                }
                return(Ok(allSymptoms));
            }
            return(BadRequest("Pleas Enter Valid Id"));
        }