コード例 #1
0
        public async Task DeleteAsync(Guid id)
        {
            var result = await _repository.GetAsync(id);

            if (result.UserId != CurrentUser.GetId())
            {
                throw new UserFriendlyException(L["NoPermissions"]);
            }

            await _repository.DeleteAsync(result);
        }
コード例 #2
0
 public async Task DeleteAsync(Guid id)
 {
     await _repository.DeleteAsync(id);
 }