private bool Equals(BPayment other) { return(StudentId == other.StudentId && PaymentTo.Equals(other.PaymentTo) && PaymentOn.Equals(other.PaymentOn) && Amount == other.Amount && Status == other.Status); }
public BPayment(Payment payment) { var config = new MapperConfiguration(cfg => cfg.CreateMap <Payment, BPayment>()); Mapper mapper = new Mapper(config); BPayment tmpBPayment = mapper.Map <BPayment>(payment); this.StudentId = tmpBPayment.StudentId; this.PaymentTo = tmpBPayment.PaymentTo; this.PaymentOn = tmpBPayment.PaymentOn; this.Amount = tmpBPayment.Amount; this.Status = tmpBPayment.Status; }