//select __key__,kindmetadata From appusers
        //select __key__, kindmetadata From `vmmc_regandproc` where dateadded
        //select __key__, dateadded From `appusers` where dateadded >= datetime('2016-08-01T00:00:01Z')
        //select * from appusers where dateadded > datetime('2016-08-16T00:00:00.1Z')
        //select __key__, dateadded From `appusers` where dateadded >=datetime('2016-08-16T00:00:00.01Z') limit 50 offset 0 order by dateadded asc
        //https://console.cloud.google.com/datastore/entities/query/gql?project=jhpzmb-vmmc-odk&ns=&kind=_GAE_MR_TaskPayload&gql=select%20*
        //Key(`__Stat_Total__`, 'total_entity_usage')
        //https://console.cloud.google.com/datastore/entities/edit?key=0%2F%7C19%2Fpp_client_devicerem%7C37%2Fname:5643a2ae27144cdaa1fe0d0e43b3864b&project=jhpzmb-vmmc-odk&ns=&kind=_GAE_MR_TaskPayload&gql=select%20*
        //https://console.cloud.google.com/datastore/entities/query/gql?project=jhpzmb-vmmc-odk&ns=&kind=_GAE_MR_TaskPayload&gql=select%20*%20from%20appusers
        //https://console.cloud.google.com/datastore/entities/edit?key=0%2F%7C8%2Fappusers%7C37%2Fname:524d91cffb024c7085148004cc47854c&project=jhpzmb-vmmc-odk&ns=&kind=_GAE_MR_TaskPayload&gql=select%20*%20from%20appusers
        //https://console.cloud.google.com/datastore/entities/query/gql?project=jhpzmb-vmmc-odk&ns=&kind=_AE_Backup_Information&gql=select%20*%20from%20appusers%20order%20by%20dateadded%20asc%20limit%20500%20offset%200%20where%20dateadded%20%3E%3D%20datetime(%272016-08-16T00:00:00.01Z%27)

        private async Task <Key> Save(DbSaveableEntity saveableEntity)
        {
            var assets    = AppInstance.Instance.ApiAssets;
            var projectId = assets[Constants.ASSET_PROJECT_ID];
            var entity    = new Entity()
            {
                Key = new Key()
                {
                    PartitionId = new PartitionId()
                    {
                        NamespaceId = "", ProjectId = projectId
                    },
                    Path = new List <PathElement>()
                    {
                        new PathElement()
                        {
                            Kind = saveableEntity.kindName.Value,
                            Name = saveableEntity.Id.Value
                        }
                    }
                },
                Properties = new Dictionary <string, Value>()
                {
                    { "id", new Value()
                      {
                          StringValue = saveableEntity.Id.Value
                      } },
                    { "entityid", new Value()
                      {
                          StringValue = saveableEntity.EntityId.Value
                      } },
                    { "dateadded", new Value()
                      {
                          TimestampValue = DateTime.Now
                      } },
                    { "datablob", new Value()
                      {
                          ExcludeFromIndexes = true,
                          StringValue        = saveableEntity
                                               .getJson()
                                               .Encrypt()
                                               .Value
                      } },
                    { "kindmetadata", new Value()
                      {
                          StringValue = saveableEntity.Entity.KindMetaData ?? string.Empty
                      } }
                }
            };
            var datastore = GetDatastoreService(GetDefaultCredential(assets), assets);

            return(await SaveToCloud(datastore, projectId, entity));
        }
        private int AddToOutQueue(DbSaveableEntity saveableEntity)
        {
            var asString  = saveableEntity.getJson();
            var outEntity = new OutEntity()
            {
                Id       = saveableEntity.Id.Value,
                DataBlob = asString
            };
            var res = 0;

            //new OutDb().DB.InsertOrReplace(outEntity);
            return(res);
        }