1、准备工作:
在项目的“管理NuGet程序包”中安装“SQLite.Net PCL”和“SQLite.Net PCL - XamarinAndroid Platform”
在引用中“添加引用”添加SQLite.Net.dll以及SQLite.Net.Platform.XamarinAndroid.dll。

2、在Common项目的Tables文件夹下创建映射类(SQLite表),这个类的结构完全是对应到SQLite数据库中的表。
创建一个名为t_Custom表

 1 public class t_Custom
 2     {
 3         /// <summary>
 4         ///id
 5         /// </summary>
 6         [PrimaryKey, AutoIncrement]
 7         public int Id{ get; set; }
 8 
 9         /// <summary>
10         ///客户名称
11         /// </summary>
12         public string CustomName { get; set; }
13     }
View Code

相关文章:

  • 2022-12-23
  • 2021-12-10
  • 2021-04-13
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2021-08-01
  • 2021-12-12
  • 2022-02-05
相关资源
相似解决方案