Example #1
0
        public async Task <IActionResult> GetListOfConfigurationAsync()
        {
            DC.ConfigurationResponse result = await _laptopProvider.GetListOfConfigurationAsync();

            if (result == null)
            {
                return(this.NotFound(result));
            }
            return(this.Ok(await Task.FromResult(result)));
        }
Example #2
0
        public async Task <ConfigurationResponse> GetListOfConfigurationAsync()
        {
            DC.ConfigurationResponse configurationResponse1 = new DC.ConfigurationResponse();
            try
            {
                Model.ConfigurationResponse configurationResponse = await _laptopDAL.GetListOfConfigurationAsync();

                configurationResponse1 = _mapper.Map <DC.ConfigurationResponse>(configurationResponse);
            }
            catch (Exception)
            {
            }
            return(configurationResponse1);
        }