void IAccountService.DeleteAccount(ApplicationVersion applicationVersion, Guid accountGuid) { RunSecurity(applicationVersion, (user) => { if (!user.Rights.Contains("CreatePayment", StringComparer.InvariantCultureIgnoreCase)) { throw new NotSupportedException("Функция удаления счета вам недоступна."); } _RepositoryAccount.DeleteAccountWithAccountBill(accountGuid); return(true); }); }