Пример #1
0
        public CountryApiModel Get(int id)
        {
            CountryBusinessLogic _business = new CountryBusinessLogic();
            CountryApiModel      country   = ApiTranslators.Translate <CountryDTO, CountryApiModel>(_business.GetById(id));

            return(country);
        }
Пример #2
0
        // [Authorize(Roles = "CountryGet")] // OAuthorize(Name="CountryGet") => Filter => 404
        public IEnumerable <CountryApiModel> Get()
        {
            CountryBusinessLogic _business = new CountryBusinessLogic();

            return(ApiTranslators.Translate <CountryDTO, CountryApiModel>(_business.GetAll()));
        }