示例#1
0
 public static DbLocal GetInstance()
 {
     if (instance == null)
     {
         instance = new DbLocal();
     }
     return(instance);
 }
示例#2
0
 public DbTask()
 {
     DbLocal.GetInstance().db.CreateTable <Task>();
 }
示例#3
0
 public int Update(Task t)
 {
     return(DbLocal.GetInstance().db.Update(t));
 }
示例#4
0
 public IEnumerable <Task> GetAll()
 {
     return(DbLocal.GetInstance().db.Table <Task>());
 }
示例#5
0
 public int Insert(Task t)
 {
     return(DbLocal.GetInstance().db.Insert(t));
 }
示例#6
0
 public Task Get(int id)
 {
     return(DbLocal.GetInstance().db.Get <Task>(id));
 }