mirror of
https://github.com/DapperLib/Dapper.git
synced 2026-10-18 14:27:47 +08:00
22 lines
564 B
C#
22 lines
564 B
C#
using System.Data.SqlClient;
|
|
using System.Windows.Forms;
|
|
using Dapper;
|
|
|
|
namespace UIBindingTest
|
|
{
|
|
public partial class BindingForm : Form
|
|
{
|
|
public BindingForm()
|
|
{
|
|
InitializeComponent();
|
|
|
|
SuspendLayout();
|
|
using (var conn = new SqlConnection("Data Source=.;Initial Catalog=master;Integrated Security=SSPI"))
|
|
{
|
|
mainGrid.DataSource = conn.Query("select * from sys.objects where 1 = 0").AsList();
|
|
}
|
|
ResumeLayout();
|
|
}
|
|
}
|
|
}
|