示例#1
0
        // GET: Account
        public AccountController(HttpClientRepo ClientRepo)
        {
            var apiClient = new ApiClient(HttpClientInstance.Instance);

            loginClient = new LoginClient(apiClient);
            _ClientRepo = ClientRepo;
        }
        /// <summary>
        /// Initialize FileService
        /// </summary>
        public AzureFileService(string accountName, string accessKey, IHttpClientRepo clientRepo = null)
        {
            _accessKey  = accessKey;
            _accoutName = accountName;
            // set the default repo in case of null
            if (clientRepo == null)
            {
                clientRepo = new HttpClientRepo();
            }

            _clientRepo = clientRepo;
        }
 // GET api/values/5
 public IEnumerable <EmployeeDto> Get(int id)
 {
     return(HttpClientRepo.GetEmployees().Where(e => e.id == id.ToString()));
 }
 // GET api/values
 public IEnumerable <EmployeeDto> Get()
 {
     return(HttpClientRepo.GetEmployees());
 }