How can I retrieve data from a SQL Server using LINQ and display each tuple in a table in the UI?
I would also like to know how I can convert the data retrieved in to JSON and send it to clients who accessed that particular service.
Any help is highly appreciated.
How can I retrieve data from a SQL Server using LINQ? Add a data context (.dbml) to your project and link it to your SQL database, adding in all the tables. You use the
MyDatabaseContextclass to interface to the database and execute LINQ queries.and display each tuple in a table in the UI? Create a GridView using a LinqDataSource with your new DataContext to pull in the appropriate data and display it.
convert the data retrieved in to JSON.. use something like the open-source JSON.Net library.
and send it to clients who accessed that particular service? Add a web service project to your solution (.wcf or .asmx), create an appropriate interface for the methods that should be called and implement them to return the correct data.
Note that at this phase in the project, you should be doing something called research, not asking questions. Google is a place to start. Come back when you have specific questions or implementation issues in trying to build your solution. What you’ve given us is a spec, not a question, and those do not belong here.