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

            var dto = new tblCashAccountsMasterDTO();

            dto.AccountId      = entity.AccountId;
            dto.AccountType    = entity.AccountType;
            dto.OpeningBalance = entity.OpeningBalance;
            dto.OpeningDate    = entity.OpeningDate;
            dto.Description    = entity.Description;

            entity.OnDTO(dto);

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

            var entity = new tblCashAccountsMaster();

            entity.AccountId      = dto.AccountId;
            entity.AccountType    = dto.AccountType;
            entity.OpeningBalance = dto.OpeningBalance;
            entity.OpeningDate    = dto.OpeningDate;
            entity.Description    = dto.Description;

            dto.OnEntity(entity);

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