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); }
public bool DeleteAccount(AccountViewModel viewModel) { return _accountService.Delete(viewModel.Id); }