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); }
public override bool Equals(Object obj) { BaseDto baseDto = obj as BaseDto; if (baseDto == null) { return(false); } else { return(Id.Equals(baseDto.Id)); } }
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"); } }