//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Tango Observables Generator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
//
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;
using System.ComponentModel;
using Tango.Core.CustomAttributes;
namespace Tango.BL.Entities
{
[Table("MEDIA_PURPOSES")]
public abstract class MediaPurposBase : ObservableEntity
{
public event EventHandler NameChanged;
public event EventHandler CodeChanged;
public event EventHandler> RmlsChanged;
protected String _name;
///
/// Gets or sets the mediapurposbase name.
///
[Column("NAME")]
public String Name
{
get
{
return _name;
}
set
{
if (_name != value)
{
_name = value;
OnNameChanged(value);
}
}
}
protected Int32 _code;
///
/// Gets or sets the mediapurposbase code.
///
[Column("CODE")]
public Int32 Code
{
get
{
return _code;
}
set
{
if (_code != value)
{
_code = value;
OnCodeChanged(value);
}
}
}
protected SynchronizedObservableCollection _rmls;
///
/// Gets or sets the mediapurposbase rmls.
///
public virtual SynchronizedObservableCollection Rmls
{
get
{
return _rmls;
}
set
{
if (_rmls != value)
{
_rmls = value;
OnRmlsChanged(value);
}
}
}
///
/// Called when the Name has changed.
///
protected virtual void OnNameChanged(String name)
{
NameChanged?.Invoke(this, name);
RaisePropertyChanged(nameof(Name));
}
///
/// Called when the Code has changed.
///
protected virtual void OnCodeChanged(Int32 code)
{
CodeChanged?.Invoke(this, code);
RaisePropertyChanged(nameof(Code));
}
///
/// Called when the Rmls has changed.
///
protected virtual void OnRmlsChanged(SynchronizedObservableCollection rmls)
{
RmlsChanged?.Invoke(this, rmls);
RaisePropertyChanged(nameof(Rmls));
}
///
/// Initializes a new instance of the class.
///
public MediaPurposBase() : base()
{
Rmls = new SynchronizedObservableCollection();
}
}
}