Beispiel #1
0
		protected override void Dispose(bool disposing)
		{
			if (disposing)
			{
				if (_userManager != null)
				{
					_userManager.Dispose();
					_userManager = null;
				}

				if (_signInManager != null)
				{
					_signInManager.Dispose();
					_signInManager = null;
				}
				if (orderHandler != null)
				{
					orderHandler.Dispose();
					orderHandler = null;
				}
			}
			this.SpicyGardenDbContext.Dispose();
			base.Dispose(disposing);
		}
Beispiel #2
0
		public OrderController()
		{
			this.SpicyGardenDbContext = new SpicyGardenDbContext();
			this.orderHandler = new OrderHandler();
		}
Beispiel #3
0
		public AccountController()
		 : this(new AccountManager(new AccountUserStore<AccountUser>()))
		{
			this.SpicyGardenDbContext = new SpicyGardenDbContext();
			this.orderHandler = new OrderHandler();
		}