0

Below is my problematic situation.

My SQL Server database has a table called reservation and contain data about

ReservationId, DriverId, ReservationType,

when a customer done reservation ,It added a row with reservationid, DriverId , ReservationType="Y" to the db.

I am able to take this data from db with pressing button.

but I need to get that reservation data continuously(if there have a new record) from db and shown that in real time in a list .

Is that possible using Asp.net MVC and Linq or can someone suggest a way to do that possible .

prag
  • 39
  • 5
  • Is a `date` or `dateTime` included with the data? This would allow to search for most recent data – Jaskier Dec 26 '18 at 16:23
  • 1
    We used something similar to the first answer here. https://stackoverflow.com/questions/5288434/how-to-monitor-sql-server-table-changes-by-using-c – Ryan Schlueter Dec 26 '18 at 16:26
  • @Symon I can take data recently from db when the page loading but after that if i added new reservation data it is only recognize when again page loading .I need track data in real-time For an example lets say after page loading someone add reservation .I need to get that one without user interaction .this is possible in java-script each and every time checking db but i don't know how to do that in C# and Asp.net mvc .thanks for your kind help. – prag Dec 26 '18 at 16:33
  • 1
    Do you really need asp.net mvc 4? As it is quite easy to do this in asp.net core, but quite complicated in that old framework. – ZorgoZ Dec 26 '18 at 16:55
  • You wrote: "My SQL Server". Do you mean a "MySQL server" instance or _your_ Microsoft SQL Server instance? – ZorgoZ Dec 26 '18 at 17:01