Advertisement
Guest User

DynamicEntity

a guest
Sep 23rd, 2019
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.56 KB | None | 0 0
  1. [DataContract]
  2.     [Serializable]
  3.     [KnownType(typeof(DynamicEntity))]
  4.     public class DynamicEntity : IDynamicEntity, IDynamicMetaObjectProvider, INotifyPropertyChanged, ICloneable, IEquatable<DynamicEntity>
  5.     {
  6.         private const string EntityTypeName = "EntityType";
  7.         private const string CreatedDateTimeName = "CreatedDate";
  8.         private const string DeletedDateTimeName = "DeletedDate";
  9.         private const string ChangedDateTimeName = "ChangedDate";
  10.         private const string CreatedPersonName = "CreatedPerson";
  11.         private const string DeletedPersonName = "DeletedPerson";
  12.         private const string ChangedPersonName = "ChangedPerson";
  13.         private const string EnabledName = "Enabled";
  14.         private const string IdName = "ID";
  15.         private const string RowVersionPropertyName = "RowVersion";
  16.         private const string NamePropertyName = "Name";
  17.  
  18.         #region Properties
  19.  
  20.         [DataMember]
  21.         public Guid EntityDefinitionId { get; set; }
  22.  
  23.         [DataMember]
  24.         public IDictionary<string, DynamicEntityProperty> DynamicProperties { get; set; }= new Dictionary<string, DynamicEntityProperty>();
  25.  
  26.         public string EntityType => GetValue<string>(EntityTypeName);
  27.  
  28.         public string Name => GetName();
  29.         #endregion
  30.  
  31.         #region CTOR
  32.  
  33.         public DynamicEntity()
  34.         {
  35.  
  36.         }
  37.  
  38.         public DynamicEntity(Guid entityDefinitionId)
  39.         {
  40.             EntityDefinitionId = entityDefinitionId;
  41.         }
  42. //Interface Implementations and other methods excluded
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement