This commit is contained in:
@@ -62,7 +62,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
try
|
||||
{
|
||||
ApiPagedResponse pr = await DataListFetcher.GetResponse(listOptions.DataListKey, ct, Url, nameof(List), listOptions, UserId, UserRoles);
|
||||
ApiPagedResponse pr = await DataListFetcher.GetResponseAsync(listOptions.DataListKey, ct, Url, nameof(List), listOptions, UserId, UserRoles);
|
||||
return Ok(new ApiOkWithPagingResponse(pr));
|
||||
}
|
||||
catch (System.UnauthorizedAccessException)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace AyaNova.DataList
|
||||
{
|
||||
internal static class DataListFetcher
|
||||
{
|
||||
internal static async Task<ApiPagedResponse> GetResponse(string DataListKey, AyContext ct, IUrlHelper Url,
|
||||
internal static async Task<ApiPagedResponse> GetResponseAsync(string DataListKey, AyContext ct, IUrlHelper Url,
|
||||
string routeName, ListOptions listOptions, long UserId, AuthorizationRoles UserRoles)
|
||||
{
|
||||
|
||||
@@ -117,11 +117,11 @@ namespace AyaNova.DataList
|
||||
//QUERY THE DB
|
||||
using (var command = ct.Database.GetDbConnection().CreateCommand())
|
||||
{
|
||||
ct.Database.OpenConnection();
|
||||
await ct.Database.OpenConnectionAsync();
|
||||
|
||||
//GET DATA RETURN ROWS
|
||||
command.CommandText = qDataQuery;
|
||||
using (var dr = command.ExecuteReader())
|
||||
using (var dr = await command.ExecuteReaderAsync())
|
||||
{
|
||||
while (dr.Read())
|
||||
{
|
||||
@@ -155,7 +155,7 @@ namespace AyaNova.DataList
|
||||
|
||||
if (f.SqlIdColumnName != null)//skip over df column id, it's not there
|
||||
{
|
||||
if (!dr.IsDBNull(nCurrentColumnPointer))
|
||||
if (!await dr.IsDBNullAsync(nCurrentColumnPointer))
|
||||
AyaField.i = dr.GetInt64(nCurrentColumnPointer);
|
||||
|
||||
nCurrentColumnPointer++;
|
||||
@@ -168,7 +168,7 @@ namespace AyaNova.DataList
|
||||
|
||||
//GET TOTAL RECORD COUNT
|
||||
command.CommandText = qTotalRecordsQuery;
|
||||
using (var dr = command.ExecuteReader())
|
||||
using (var dr = await command.ExecuteReaderAsync())
|
||||
{
|
||||
if (dr.Read())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user