Example #1
0
 public T BaseCopy <T>(BaseDto dto) where T : class
 {
     dto.Id         = this.Id;
     dto.CreateDate = this.CreateDate;
     dto.CreatedBy  = this.CreatedBy;
     dto.UpdateDate = this.UpdateDate;
     dto.UpdatedBy  = this.UpdatedBy;
     dto.IsActive   = this.IsActive;
     return(dto as T);
 }
Example #2
0
        public override bool Equals(Object obj)
        {
            BaseDto baseDto = obj as BaseDto;

            if (baseDto == null)
            {
                return(false);
            }
            else
            {
                return(Id.Equals(baseDto.Id));
            }
        }
Example #3
0
        public virtual int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            BaseDto baseDto = obj as BaseDto;

            if (baseDto != null)
            {
                return(this.Id.CompareTo(baseDto.Id));
            }
            else
            {
                throw new ArgumentException("Object is not a BaseDto");
            }
        }