public void UpdateImage(CImage pImage)
 {
     try
     {
         using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "Images.db")))
         {
             connection.Update(pImage);
         }
     }
     catch (SQLiteException ex)
     {
         Log.Info("SQLiteEx", ex.Message);
     }
 }
        public CImage GetImageByID(int ID)
        {
            try
            {
                using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "Images.db")))
                {
                    string sql = "select * from CImage where id = '" + ID + "'";

                    var res = connection.Query<CImage>(sql);
                    CImage rezultat = res.FirstOrDefault();
                   
                    return rezultat;
                }
            }
            catch (SQLiteException ex)
            {
                Log.Info("SQLiteEx", ex.Message);
                return null;
            }
        }