/// <summary>
        /// Updates an existing shopping list
        /// </summary>
        /// <param name="value"></param>
        public void Update(ShoppingList value)
        {
            using (var scope = new TransactionScope())
            {
                var existingList = _dataContext.Lists.FirstOrDefault(list => list.Id == value.Id);

                if (existingList == null)
                {
                    throw new ArgumentException("Provided value does not exist in the database and cannot be updated.");
                }

                existingList.Name = value.Name;

                _dataContext.SaveChanges();
                scope.Complete();
            }
        }
        /// <summary>
        /// Creates a new shopping list
        /// </summary>
        /// <param name="shoppingList"></param>
        /// <returns></returns>
        public void Create(ShoppingList shoppingList, string ownerId)
        {
            using (var scope = new TransactionScope())
            {
                // Assign the provided owner to the shopping list.
                if (shoppingList.Users == null)
                {
                    shoppingList.Users = new Collection <ApplicationUser>();
                }

                shoppingList.Users.Add(_dataContext.Users.FirstOrDefault(usr => usr.Id == ownerId));

                // Store the shopping list as part of this method
                _dataContext.Lists.Add(shoppingList);
                _dataContext.SaveChanges();

                scope.Complete();
            }
        }