public TraineePaymentEntity(DataAccessLogic.tblTraineePayment tblTraineePayment)
 {
     this.ID = tblTraineePayment.ID;
     this.TraineeCourseEntity = new TraineeCourseEntity(tblTraineePayment.tblTraineeCourse);
     this.PaymentDate         = tblTraineePayment.PaymentDate;
     this.PaymentAmount       = tblTraineePayment.PaymentAmount;
     this.CreatedBy           = tblTraineePayment.CreatedBy;
     this.CreatedDate         = tblTraineePayment.CreatedDate;
     this.UpdatedBy           = tblTraineePayment.UpdatedBy;
     this.UpdatedDate         = (DateTime)tblTraineePayment.UpdatedDate;
 }
 public T MapToTableModel <T>() where T : class
 {
     DataAccessLogic.tblTraineePayment traineePayment = new DataAccessLogic.tblTraineePayment();
     traineePayment.ID = this.ID;
     traineePayment.TraineeCourseID = this.TraineeCourseEntity.ID;
     traineePayment.PaymentDate     = this.PaymentDate;
     traineePayment.PaymentAmount   = this.PaymentAmount;
     traineePayment.CreatedBy       = this.CreatedBy;
     traineePayment.CreatedDate     = this.CreatedDate;
     traineePayment.UpdatedBy       = this.UpdatedBy;
     traineePayment.UpdatedDate     = this.UpdatedDate;
     return(traineePayment as T);
 }