public async Task<IEnumerable<DimMuscle>> GetMusclesAsync(WebApiCredentials credentials, CancellationToken ct) { ct.ThrowIfCancellationRequested(); return await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl)) .For<DimMuscle>() .FindEntriesAsync(ct); }
public async Task<ApplicationSettings> GetSettingsAsync(WebApiCredentials credentials, string userId, CancellationToken ct) { ct.ThrowIfCancellationRequested(); return await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl)) .For<ApplicationSettings>() .Filter(e => e.ApplicationId == credentials.ApplicationId && e.UserId == userId) .FindEntryAsync(ct); }
public virtual async Task<AgeBounds> GetAgeBoundsAsync(WebApiCredentials credentials, CancellationToken ct) { var result= await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl)) .Unbound<D>() .Function("GetAgeBounds") .ExecuteAsSingleAsync(ct); return result.GetAgeBounds; }
public async Task<DimPatient> GetPatientAsync(WebApiCredentials credentials, int id, CancellationToken ct) { ct.ThrowIfCancellationRequested(); return await new ODataClient(credentials.ToSettings().WithUrl(_apiUrl)) .For<DimPatient>() .Key(id) .FindEntryAsync(ct); }