Exemplo n.º 1
0
        public async Task <bool> RemoveResource(string id, string rev)
        {
            if (id == string.Empty)
            {
                return(false);
            }

            // Get App ID from couchdb
            var appRes = await couchContext.GetAsync <APIResource>(couchDbHelper, id);

            if (!appRes.IsSuccess)
            {
                return(false);
            }

            var res = await apiLao.RemoveResource(appRes.Content.ResID);

            if (res)
            {
                var result = await couchContext.DeleteAsync(couchDbHelper, id, rev);

                return(result.IsSuccess);
            }
            return(false);
        }