public async Task <IEnumerable <MaterialLookupResult> > GetLookupAsync(MaterialLookupRequestArgs requestArgs) { return(await DbContext.ExecuteReaderAsync(DataConstants.PR_GET_PLANTS_LOOKUP, CommandType.StoredProcedure, args => { args.Add("@TestID", requestArgs.TestID); //args.Add("@UserID", userContext.GetContext().FullName); args.Add("@Query", requestArgs.Query); }, reader => new MaterialLookupResult { MaterialID = reader.Get <int>(0), MaterialKey = reader.Get <string>(1) })); }
public async Task <IEnumerable <MaterialLookupResult> > GetLookupAsync(MaterialLookupRequestArgs requestArgs) { return(await repository.GetLookupAsync(requestArgs)); }
public async Task <IHttpActionResult> Get([FromUri] MaterialLookupRequestArgs requestArgs) { var materials = await materialService.GetLookupAsync(requestArgs); return(Ok(materials)); }