Exemple #1
0
 public Entities.EntityAlarm ToEntityAlarmEF(BusinessLogic.DTO.EntityAlarm alarm)
 {
     return(new Entities.EntityAlarm()
     {
         Id = alarm.Id,
         Alarm = new Entities.Alarm()
         {
             Id = alarm.Id,
             CreationDate = alarm.CreationDate,
             Time = Int16.Parse(alarm.Time),
             PostCount = alarm.PostCount,
             PostQuantity = Int16.Parse(alarm.PostQuantity),
             Type = alarm.Type
         },
         Entity = ToEntityEF(alarm.Entity)
     });
 }
Exemple #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            if (obj == DBNull.Value)
            {
                return(false);
            }

            EntityAlarm alarm = (EntityAlarm)obj;

            return(this.Type == alarm.Type &&
                   this.entity.Id == alarm.entity.Id &&
                   this.PostQuantity == alarm.PostQuantity);
        }