/// <summary>
        /// Converts this instance of <see cref="tblConsignee"/> to an instance of <see cref="tblConsigneeDTO"/>.
        /// </summary>
        /// <param name="entity"><see cref="tblConsignee"/> to convert.</param>
        public static tblConsigneeDTO ToDTO(this tblConsignee entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new tblConsigneeDTO();

            dto.ConsigneeId   = entity.ConsigneeId;
            dto.ConsigneeName = entity.ConsigneeName;
            dto.Address       = entity.Address;
            dto.PhoneNo       = entity.PhoneNo;
            dto.STNOCSTNO     = entity.STNOCSTNO;
            dto.TINNOVATNO    = entity.TINNOVATNO;
            dto.Description   = entity.Description;
            dto.CreationDate  = entity.CreationDate;

            entity.OnDTO(dto);

            return(dto);
        }
        /// <summary>
        /// Converts this instance of <see cref="tblConsigneeDTO"/> to an instance of <see cref="tblConsignee"/>.
        /// </summary>
        /// <param name="dto"><see cref="tblConsigneeDTO"/> to convert.</param>
        public static tblConsignee ToEntity(this tblConsigneeDTO dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new tblConsignee();

            entity.ConsigneeId   = dto.ConsigneeId;
            entity.ConsigneeName = dto.ConsigneeName;
            entity.Address       = dto.Address;
            entity.PhoneNo       = dto.PhoneNo;
            entity.STNOCSTNO     = dto.STNOCSTNO;
            entity.TINNOVATNO    = dto.TINNOVATNO;
            entity.Description   = dto.Description;
            entity.CreationDate  = dto.CreationDate;

            dto.OnEntity(entity);

            return(entity);
        }
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="tblConsignee"/> converted from <see cref="tblConsigneeDTO"/>.</param>
 static partial void OnEntity(this tblConsigneeDTO dto, tblConsignee entity);
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="tblConsigneeDTO"/> converted from <see cref="tblConsignee"/>.</param>
 static partial void OnDTO(this tblConsignee entity, tblConsigneeDTO dto);