Ejemplo n.º 1
0
        public async Task <IEnumerable <HealthInsuranceDataModel> > GetAll()
        {
            var healthInsurances = await _healthInsuranceRepository.GetAllAsync();

            var healthInsurancesModel = new List <HealthInsuranceDataModel>();

            foreach (var healthInsurance in healthInsurances)
            {
                healthInsurancesModel.Add(new HealthInsuranceDataModel()
                {
                    Id   = healthInsurance.Id,
                    Name = healthInsurance.Name,
                    Type = healthInsurance.Type
                });
            }

            return(healthInsurancesModel);
        }