Exemplo n.º 1
0
 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)
     }));
 }
Exemplo n.º 2
0
 public async Task <IEnumerable <MaterialLookupResult> > GetLookupAsync(MaterialLookupRequestArgs requestArgs)
 {
     return(await repository.GetLookupAsync(requestArgs));
 }
Exemplo n.º 3
0
        public async Task <IHttpActionResult> Get([FromUri] MaterialLookupRequestArgs requestArgs)
        {
            var materials = await materialService.GetLookupAsync(requestArgs);

            return(Ok(materials));
        }