Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
示例#1
0
        // get interested in a theme category.
        public void getInterestedThemeCategory(CategoriasTematica themeCategory)
        {
            // create an interest
            Interese interest = new Interese();
            interest.idCategoriaTematica = themeCategory.id;
            interest.idUsuario = UserInfo.Id;

            // add interest to the database.
            try
            {
                IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();
                indignadoContext.Intereses.InsertOnSubmit(interest);
                indignadoContext.SubmitChanges();
            }
            catch (Exception error)
            {
            }
        }
		private void detach_Intereses(Interese entity)
		{
			this.SendPropertyChanging();
			entity.CategoriasTematica = null;
		}
 partial void DeleteInterese(Interese instance);
 partial void UpdateInterese(Interese instance);
 partial void InsertInterese(Interese instance);
		private void detach_Intereses(Interese entity)
		{
			this.SendPropertyChanging();
			entity.Usuario = null;
		}
		private void attach_Intereses(Interese entity)
		{
			this.SendPropertyChanging();
			entity.Usuario = this;
		}