コード例 #1
0
        public bool AddAccount(AccountViewModel viewModel)
        {
            var account = new Account();
            account.Name = viewModel.Name;
            account.Email = viewModel.Email;
            account.Url = viewModel.Url;
            account.Phone = viewModel.Phone;
            account.AccountType = (AccountTypeEnum)viewModel.AccountType;
            account.AccountStatus = (AccountStatusEnum)viewModel.AccountStatus;

            return _accountService.Add(account);
        }
コード例 #2
0
 public bool DeleteAccount(AccountViewModel viewModel)
 {
     return _accountService.Delete(viewModel.Id);
 }