Esempio n. 1
0
		public void AddAccount(Account account)
		{
			var accountDao = Converter.Convert<Account, AccountDao>(account);
			dbContext.Accounts.Add(accountDao);
			dbContext.SaveChanges();
		}
Esempio n. 2
0
		public void DeleteAccount(Account account)
		{
			var accountDao = dbContext.Accounts.Where(x => x.ClientId.Equals(account.ClientId) && x.Year.Equals(account.Year)).FirstOrDefault(x => x.Name.Equals(account.Name));
			dbContext.Accounts.Remove(accountDao);
			dbContext.SaveChanges();
		}
Esempio n. 3
0
		public ActionResult DeleteAccount(Account account)
		{
			_factory.GetAccoutnsService().DeleteAccount(account);
			return new JsonResult { Data = true };
		}