public async Task <GetObjectDropDownListResponse> GetObjectDropDown([FromBody] GetTypedDropDownListRequest request) => await this.clientFactory.PostAsync <GetObjectDropDownListResponse> ( "api/Dropdown/GetObjectDropdown", JsonSerializer.Serialize(request), this.configurationOptions.BaseBslUrl );
public Task <GetObjectDropDownListResponse> GetObjectDropDown(GetTypedDropDownListRequest request, string url = null) { return(Task.FromResult(new GetObjectDropDownListResponse { DropDownList = new List <ViewModelBase> { } })); }
public Task <GetLookupDropDownListResponse> GetLookupDropDown(GetTypedDropDownListRequest request, string url = null) { return(Task.FromResult(new GetLookupDropDownListResponse { DropDownList = new List <LookUpsModel> { } })); }
public static async Task <GetObjectDropDownListResponse> GetObjectSelect(GetTypedDropDownListRequest request, IContextRepository contextRepository, IMapper mapper) => await(Task <GetObjectDropDownListResponse>) "GetObjectSelect".GetSelectMethod() .MakeGenericMethod ( Type.GetType(request.ModelType), Type.GetType(request.DataType), Type.GetType(request.ModelReturnType), Type.GetType(request.DataReturnType) ).Invoke(null, new object[] { request, contextRepository, mapper });
public async Task <GetObjectDropDownListResponse> GetObjectDropDown([FromBody] GetTypedDropDownListRequest request) { return(await RequestHelpers.GetObjectSelect ( request, repository, mapper )); }
public async Task <GetObjectDropDownListResponse> GetObjectDropDown(GetTypedDropDownListRequest request, string url = null) { string jsonRequest = JsonSerializer.Serialize(request); var response = await GetFromCache <GetObjectDropDownListResponse>(jsonRequest); if (response != null) { return(response); } response = await PollyHelpers.ExecutePolicyAsync ( () => this.factory.PostAsync <GetObjectDropDownListResponse> ( url ?? "api/Dropdown/GetObjectDropdown", jsonRequest, App.BASE_URL ) ); await AddToCache(jsonRequest, response); return(response); }
public static async Task <GetObjectDropDownListResponse> GetObjectSelect <TModel, TData, TModelReturn, TDataReturn>(GetTypedDropDownListRequest request, IContextRepository contextRepository, IMapper mapper) where TModel : BaseModel where TData : BaseData => new GetObjectDropDownListResponse { DropDownList = (IEnumerable <ViewModelBase>) await Query <TModel, TData, TModelReturn, TDataReturn> ( contextRepository, mapper.MapToOperator(request.Selector) ) };
public static async Task <GetLookupDropDownListResponse> GetLookupSelect <TModel, TData, TModelReturn, TDataReturn>(GetTypedDropDownListRequest request, IContextRepository contextRepository, IMapper mapper) where TModel : BaseModel where TData : BaseData => new GetLookupDropDownListResponse { DropDownList = (IEnumerable <Domain.Entities.LookUpsModel>) await Query <TModel, TData, TModelReturn, TDataReturn> ( contextRepository, mapper.MapToOperator(request.Selector) ) };