Beispiel #1
0
        public async Task <bool> DeleteAsync <TSource>(Expression <Func <TSource, bool> > expression) where TSource : class
        {
            try
            {
                GetProperties(expression);
                string uri = FormatUriWithIds <TSource>();
                _token = await _jwtTokenService.CheckTokenAsync(_token);

                var response = await _http.DeleteAsync(uri, AppConstants.HttpClientName, _token.Token);

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
        public async Task <bool> DeleteAsync <TSource>(Expression <Func <TSource, bool> > expression) where TSource : class
        {
            try
            {
                GetProperties(expression);
                string uri = FormatUriWithIds <TSource>();
                token = await _jwt.CheckTokenAsync(token);

                var response = await _http.DeleteAsync(uri, "AdminClient", token.Token);

                return(true);
            }
            catch
            {
                return(false);
            }
        }