天天看點

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

C#連接配接SQLite資料庫,提醒自己别忘了

針對C#的入門程式猿

SQLite3的下載下傳![表結構很簡單]

打開VS2019:

建立一個WPF程式

在管理NuGet程式包下導入

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

建立實體類

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

建立資料庫連接配接的Service。

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

Xaml層調用連接配接方法

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

xaml代碼

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

完成

C#(WPF)連接配接SQLite資料庫,利用ViewModel顯示資料

才開始C#的學習,如有不足,請多指正