We need an analogue of functions from php in C# (selection from the database)

there is a piece of code in php:

$query="SELECT * FROM table1";  
$result = mysql_query($query);  
while($line=mysql_fetch_array($result))  
{// (  line   )}

We need an analogue of the code in C#.
Does anyone have the necessary knowledge?


Answer 1

Depends on what you want to get. It is necessary to dig towards ADO.NET and LINQ to SQL.

Leave a reply

Please enter your comment!
Please enter your name here