public object GetVendors() { var temp = new GetVendorsRequest(); var result = temp.RunRequest(); return(result); }
public async Task <IHttpActionResult> Get() { //var request = new GetVendorsRequest() { TenantId = (await _userManager.GetUserAsync(User)).TenantId }; var request = new GetVendorsRequest() { TenantId = 1 }; return(Ok(await _mediator.Send(request))); }
public List <Vendr> All() { var result = new GetVendorsRequest().Execute(Api.Client); var fetchedVendors = result.Data.Vendors; List <Vendr> vendors = new List <Vendr>(); if (result.Status == 200) { for (int i = 0; i < fetchedVendors.Count; i++) { Vendr tempVendor = new Vendr(); tempVendor.UpdateFromRequest(Utils.DictionaryOfJsonFields(fetchedVendors[i])); vendors.Add(tempVendor); } } return(vendors); }