C
C#6mo ago
Suraj Kumar

✅ In window service app how to get table and column data in asp.net core

I have created a window service app in which I have implemented a function which gets the number of records in table but I want the data which is in the columns
No description
No description
No description
5 Replies
Angius
Angius6mo ago
uh, execute an appropriate query...? Your data is a dictionary that should contain the data So, that Use that
Suraj Kumar
Suraj KumarOP6mo ago
No description
No description
Suraj Kumar
Suraj KumarOP6mo ago
This is the data which I want to get
No description
Angius
Angius6mo ago
and it is stored in the dictionary you get from your method So use that dictionary Or a list of dictionaries For whatever reason
Suraj Kumar
Suraj KumarOP6mo ago
var data = await DatabaseService.GetTableDataAsync("WServiceHangfire", "JobName", "Id", "PendingStatus, Date");

var filteredRows = data.Where(row => (bool)row["PendingStatus"]).ToList();

_logger.LogInformation("Fetched {Count} records.",filteredRows.ToArray());
var data = await DatabaseService.GetTableDataAsync("WServiceHangfire", "JobName", "Id", "PendingStatus, Date");

var filteredRows = data.Where(row => (bool)row["PendingStatus"]).ToList();

_logger.LogInformation("Fetched {Count} records.",filteredRows.ToArray());
This only gives the first row Hey @ZZZZZZZZZZZZZZZZZZZZZZZZZ, can you help me please I want to use hangfire as windows service. Is there any example or somthing related to this or can you guide me with this?
Want results from more Discord servers?
Add your server