public static async Task <List <InmateAccountDto> > LoadInmateAccounts(GetInmateArgs args)
        {
            List <SqlParameter> parameters = new List <SqlParameter>();

            parameters.AddSqlParam("@Search", args.Search);
            parameters.AddSqlParam("@FacilityFilters", args.SiteIds);

            return((await SqlHelper.InvokeStoredProcAsync <InmateAccountDto>(ConfigurationManager.ConnectionStrings["ScidynDbConnection"].ToString(),
                                                                             "uspSearchInmateForTypeahead",
                                                                             parameters)).ToList());
        }
        public async Task <IHttpActionResult> LoadInmates(GetInmateArgs args)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    List <InmateAccountDto> result = await DbAccessor.LoadInmateAccounts(args);

                    return(Ok(result));
                }

                return(BadRequest(ModelState));
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Failed to load ");
                return(InternalServerError(ex));
            }
        }