locked
Reading Data RRS feed

  • Question

  • Hi, i am writing a stored procedure something like 

    Select *,TotalRows = COUNT(*) OVER() from MyTable where ....

    I am able to read the data but unable to get the Total Rows even tough i have mentioned Total Rows in my Class as a Property 

    Class Myclass {[Not Mapped]public int TotalRows {get;set;}}
    So, I get total rows as 0 in my api call, so tell me how will i get the total rows from the database (dynamic column) in the api (class object)


    Best Regards, slalithp

    Monday, April 6, 2020 8:06 AM

All replies

  • Hi!

    You provide way too liitle information in the post for us to be able to give an answer. 

    From what you have said though, it seems to me like you are using some kind of ORM. Is that correct?

    Also, if you execute the proc directly in the db, do you get the TotalRows back?


    http://www.nielsberglund.com | @nielsberglund

    Tuesday, April 7, 2020 4:18 AM