Пример #1
0
        public void CountryListTest()
        {
            BusinessLogic       businessLogic  = new BusinessLogic();
            ContinentModelForId continentModel = new ContinentModelForId
            {
                ContinentId = 1,
            };
            var countrytList = businessLogic.ShowCountryByContinentId(continentModel);

            Assert.IsNotNull(countrytList);
        }
        public List <Country> ShowCountryByContinentId(ContinentModelForId continentModelForId)
        {
            List <Country> country = _db.Countries.Where(x => x.Continent_Id == continentModelForId.ContinentId).ToList();

            return(country);
        }
 public IHttpActionResult ShowCountryByContinentId([FromBody] ContinentModelForId continentModelForId)
 {
     return(Ok(_businessLogic.ShowCountryByContinentId(continentModelForId)));
 }