示例#1
0
 public long CheckAppId(string appname)
 {
     var reg = ApplicationsIds.FirstOrDefault(x => x.AppName == appname);
     if (reg != null)
     {
         return reg.Id;
     }
     else
     {
         // create new appid
         var apps = new Applications();
         long newId = (long)apps.Insert(new { AppName=appname});
         ApplicationsIds.Add(new { Id = newId, AppName = appname });
         return newId;
     }
 }
示例#2
0
 public SQLiteDataAccess()
 {
     var tb=new Applications();
     ApplicationsIds = tb.All().ToList();
 }