Ejemplo n.º 1
0
        public async Task <ActionResult> Index()
        {
            var filter  = new FilterModel();
            var Country = await _Country.GetAllCountry(filter);

            return(View(Country));
        }
Ejemplo n.º 2
0
        // GET api/country
        public HttpResponseMessage Get()
        {
            var country = _Country.GetAllCountry();

            if (country != null)
            {
                var countryEntities = country as List <CountryEntities> ?? country.ToList();
                if (countryEntities.Any())
                {
                    return(Request.CreateResponse(HttpStatusCode.OK, countryEntities));
                }
            }
            return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "country not found"));
        }
Ejemplo n.º 3
0
        public IHttpActionResult GetCountry()
        {
            var a = _country.GetAllCountry();

            return(Ok(a));
        }
Ejemplo n.º 4
0
        public List <Country> GetAllCountries()
        {
            var countryList = icountryrepobj.GetAllCountry();

            return(countryList);
        }