ConsoleApp1/Services/PersonService.cs
/// <summary>
/// Get random generated Person data from Web API
/// </summary>
/// <param name="parameters"></param>
/// <returns></returns>
Get random generated Person data from Web API
Get random generated Person data from Web API
public async Task<Person> GetRandomPersonAsync(IDictionary<string, string> parameters = null)
        {
            try
            {
                string url = String.Empty.AddQueryString(parameters);
                var person = await Client.GetFromJsonAsync<Person>(url);
                return person;
            }
            catch (PersonServiceException ex)
            {
                throw new PersonServiceException(PersonServiceException.PERSON_GET_ERROR, ex);
            }
        }
public async Task < Person > GetRandomPersonAsync ( IDictionary < string , string > parameters = null ) { try { string url = String . Empty . AddQueryString ( parameters ) ; var person = await Client . GetFromJsonAsync < Person > ( url ) ; return person ; } catch ( PersonServiceException ex ) { throw new PersonServiceException ( PersonServiceException . PERSON_GET_ERROR , ex ) ; } }
Get random generated Person data from Web API
Get random generated Person data from Web API
None
parameters
IDictionary<string, string>
None