2
如何將wpf控件綁定到SQL Server屬性。就像說一個列表框通過存儲庫模式將WPF控件綁定到SQL服務器
<ListView>
<ListView.View>
<GridView>
<GridViewColumn Header="Name">
<GridViewColumn Header="Date Assigned">
<GridViewColumn Header="Date Due">
</GridView>
</ListView.View>
<!-- iterate through all the Names in the database and output under GridViewColumn Name -->
<!-- iterate through all the DateAssigned in the database and output under GridViewColumn Date Assigned -->
<!-- iterate through all the DateDue in the database and output under GridViewColumn Date Due -->
</ListView>
我正在使用實體框架和存儲庫模式。所以我會通過_repository.ToList()調用所有名稱到列表中。