public void Delete(string id) { using (var scope = _tracer.BuildSpan(string.Concat(_repoName, ".", "Delete(", id.DefaultIfNullOrEmpty("<NULL>"), ")")).StartActive(true)) { scope.Span.SetTag("trace-type", "OpenTrace"); _innerRepository.Delete(id); } }
public async Task Delete(int id) { var api = await Get(id); await _apiRepository.Delete(api); await _apiCachingProvider.Delete(api.RelativePath); }
/// <summary> /// 删除api /// </summary> /// <param name="api"></param> /// <returns></returns> public async Task <Result> Delete(Api api) { if (api.IsSystem != null && (Status)api.IsSystem == Status.Yes) { return(Result.ReFailure(ResultCodes.PermissionSysApiDeleteError)); } bool isdDelete = await _apiRepository.Delete(api); if (!isdDelete) { return(Result.ReFailure(ResultCodes.PermissionSysApiDeleteError)); } return(Result.ReSuccess()); }
public void Delete(string id) { using (var scope = Tracer.Instance.StartActive(string.Concat(_repoName, ".", "Delete(", id.DefaultIfNullOrEmpty("<NULL>"), ")"))) { DecorateScope(scope, id); try { _innerRepository.Delete(id); scope.Span.SetTag(Tags.SqlRows, "1"); } catch (Exception x) when(TraceErrorMessage(x, scope)) { throw; } } }
public void Delete(string id) { _cacheClient.TryRemove <T>(id); _innerRepository.Delete(id); }
public void Delete(string id) => _innerRepository.Delete(id);
public ViewResult Delete(int id) { repo.Delete(id); return(View("Index", repo.GetAll())); }