private void detach_Buggs_Users1(Buggs_User entity)
		{
			this.SendPropertyChanging();
			entity.User1 = null;
		}
		private void attach_Buggs_Users1(Buggs_User entity)
		{
			this.SendPropertyChanging();
			entity.User1 = this;
		}
 partial void DeleteBuggs_User(Buggs_User instance);
 partial void UpdateBuggs_User(Buggs_User instance);
 partial void InsertBuggs_User(Buggs_User instance);
        /// <summary>
        /// Associate a user with a Bugg.
        /// </summary>
        /// <param name="Bugg">The Bugg to associate the user with.</param>
        /// <param name="UserNameId">The id of a user to associate with the Bugg.</param>
        /// <returns>true if a new relationship was added, false otherwise.</returns>
        public bool LinkUserToBugg( Bugg Bugg, int UserNameId )
        {
            try
            {
                int BuggUserCount = BuggsDataContext.Buggs_Users.Where( BuggUserInstance => BuggUserInstance.BuggId == Bugg.Id && BuggUserInstance.UserNameId == UserNameId ).Count();
                if( BuggUserCount < 1 )
                {
                    Buggs_User NewBuggsUser = new Buggs_User();
                    NewBuggsUser.BuggId = Bugg.Id;
                    NewBuggsUser.UserNameId = UserNameId;

                    BuggsDataContext.Buggs_Users.InsertOnSubmit( NewBuggsUser );
                    return true;
                }
            }
            catch( Exception Ex )
            {
                Debug.WriteLine( "Exception in LinkCrashToBugg: " + Ex.ToString() );
            }

            return false;
        }