Example #1
0
        /// <summary>
        /// Converts this instance of <see cref="tblBankTransaction"/> to an instance of <see cref="tblBankTransactionDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="tblBankTransaction"/> to convert.</param>
        public static tblBankTransactionDTO ToDTO(this tblBankTransaction entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new tblBankTransactionDTO();

            dto.TransactionId = entity.TransactionId;
            dto.BankId        = entity.BankId;
            dto.TDate         = entity.TDate;
            dto.TType         = entity.TType;
            dto.DrAmount      = entity.DrAmount;
            dto.CrAmount      = entity.CrAmount;
            dto.Description   = entity.Description;

            entity.OnDTO(dto);

            return(dto);
        }
Example #2
0
        /// <summary>
        /// Converts this instance of <see cref="tblBankTransactionDTO"/> to an instance of <see cref="tblBankTransaction"/>.
        /// </summary>
        /// <param name="dto"><see cref="tblBankTransactionDTO"/> to convert.</param>
        public static tblBankTransaction ToEntity(this tblBankTransactionDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new tblBankTransaction();

            entity.TransactionId = dto.TransactionId;
            entity.BankId        = dto.BankId;
            entity.TDate         = dto.TDate;
            entity.TType         = dto.TType;
            entity.DrAmount      = dto.DrAmount;
            entity.CrAmount      = dto.CrAmount;
            entity.Description   = dto.Description;

            dto.OnEntity(entity);

            return(entity);
        }
Example #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="tblBankTransaction"/> converted from <see cref="tblBankTransactionDTO"/>.</param>
 static partial void OnEntity(this tblBankTransactionDTO dto, tblBankTransaction entity);
Example #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="tblBankTransactionDTO"/> converted from <see cref="tblBankTransaction"/>.</param>
 static partial void OnDTO(this tblBankTransaction entity, tblBankTransactionDTO dto);