public async Task <IEnumerable <Table> > GetAll() { IEnumerable <Table> tablesList; using (var connection = new SqlConnection(_config.GetConnectionString("RestaurantAPI"))) { tablesList = await connection.QueryAsync <Table>(SqlQueriesFactory.GetAllTables()); } return(tablesList); }