예제 #1
0
        public async Task <bool> DeleteClient(string id, string rev)
        {
            var result = await couchContext.DeleteAsync(couchDBHelper,
                                                        id, rev);

            return(result.IsSuccess);
        }
예제 #2
0
        public async Task <bool> RemoveClientApp(string id, string rev)
        {
            if (id == string.Empty)
            {
                return(false);
            }

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

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

            var res = await apiLao.RemoveClient(appRes.Content.AppID);

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

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

            //var result = await couchContext.DeleteAsync(couchDbHelper, id, rev);

            //return result.IsSuccess;
        }