/// <summary> /// Converts this instance of <see cref="tblTransaction"/> to an instance of <see cref="tblTransactionDTO"/>. /// </summary> /// <param name="entity"><see cref="tblTransaction"/> to convert.</param> public static tblTransactionDTO ToDTO(this tblTransaction entity) { if (entity == null) { return(null); } var dto = new tblTransactionDTO(); dto.TransactionId = entity.TransactionId; dto.AccountId = entity.AccountId; dto.TDate = entity.TDate; dto.DrAmount = entity.DrAmount; dto.CrAmount = entity.CrAmount; dto.Recievedby = entity.Recievedby; dto.PaidBy = entity.PaidBy; dto.Description = entity.Description; dto.ChequeNo = entity.ChequeNo; dto.ChequeDate = entity.ChequeDate; entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="tblTransactionDTO"/> to an instance of <see cref="tblTransaction"/>. /// </summary> /// <param name="dto"><see cref="tblTransactionDTO"/> to convert.</param> public static tblTransaction ToEntity(this tblTransactionDTO dto) { if (dto == null) { return(null); } var entity = new tblTransaction(); entity.TransactionId = dto.TransactionId; entity.AccountId = dto.AccountId; entity.TDate = dto.TDate; entity.DrAmount = dto.DrAmount; entity.CrAmount = dto.CrAmount; entity.Recievedby = dto.Recievedby; entity.PaidBy = dto.PaidBy; entity.Description = dto.Description; entity.ChequeNo = dto.ChequeNo; entity.ChequeDate = dto.ChequeDate; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="tblTransaction"/> converted from <see cref="tblTransactionDTO"/>.</param> static partial void OnEntity(this tblTransactionDTO dto, tblTransaction entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="tblTransactionDTO"/> converted from <see cref="tblTransaction"/>.</param> static partial void OnDTO(this tblTransaction entity, tblTransactionDTO dto);