//------------------------------------------------------------------------------ // // 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("SITES_RMLS")] public abstract class SitesRmlBase : ObservableEntity { public event EventHandler RmlChanged; public event EventHandler SiteChanged; protected String _siteguid; /// /// Gets or sets the sitesrmlbase site guid. /// [Column("SITE_GUID")] [ForeignKey("Site")] public String SiteGuid { get { return _siteguid; } set { if (_siteguid != value) { _siteguid = value; } } } protected String _rmlguid; /// /// Gets or sets the sitesrmlbase rml guid. /// [Column("RML_GUID")] [ForeignKey("Rml")] public String RmlGuid { get { return _rmlguid; } set { if (_rmlguid != value) { _rmlguid = value; } } } protected Rml _rml; /// /// Gets or sets the sitesrmlbase rml. /// [XmlIgnore] [JsonIgnore] public virtual Rml Rml { get { return _rml; } set { if (_rml != value) { _rml = value; if (Rml != null) { RmlGuid = Rml.Guid; } OnRmlChanged(value); } } } protected Site _site; /// /// Gets or sets the sitesrmlbase site. /// [XmlIgnore] [JsonIgnore] public virtual Site Site { get { return _site; } set { if (_site != value) { _site = value; if (Site != null) { SiteGuid = Site.Guid; } OnSiteChanged(value); } } } /// /// Called when the Rml has changed. /// protected virtual void OnRmlChanged(Rml rml) { RmlChanged?.Invoke(this, rml); RaisePropertyChanged(nameof(Rml)); } /// /// Called when the Site has changed. /// protected virtual void OnSiteChanged(Site site) { SiteChanged?.Invoke(this, site); RaisePropertyChanged(nameof(Site)); } /// /// Initializes a new instance of the class. /// public SitesRmlBase() : base() { } } }