Пример #1
0
 public Entities.AuthorAlarm ToAuthorAlarmEF(BusinessLogic.DTO.AuthorAlarm alarm)
 {
     return(new Entities.AuthorAlarm()
     {
         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,
         },
         TimeMeasure = alarm.TimeMeasure
     });
 }
Пример #2
0
        public override bool Equals(object obj)
        {
            if (obj == null)
            {
                return(false);
            }

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

            AuthorAlarm alarm = (AuthorAlarm)obj;

            return(this.Type == alarm.Type &&
                   this.TimeMeasure == alarm.TimeMeasure &&
                   this.Time == alarm.Time);
        }