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

            var dto = new tblConsignorDTO();

            dto.ConsignorId   = entity.ConsignorId;
            dto.ConsignorName = entity.ConsignorName;
            dto.Address       = entity.Address;
            dto.PhoneNo       = entity.PhoneNo;
            dto.STNOCSTNO     = entity.STNOCSTNO;
            dto.TINNOVATNO    = entity.TINNOVATNO;
            dto.Description   = entity.Description;
            dto.CreationDate  = entity.CreationDate;
            dto.Type          = entity.Type;
            dto.Code          = entity.Code;
            entity.OnDTO(dto);

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

            var entity = new tblConsignor();

            entity.ConsignorId   = dto.ConsignorId;
            entity.ConsignorName = dto.ConsignorName;
            entity.Address       = dto.Address;
            entity.PhoneNo       = dto.PhoneNo;
            entity.STNOCSTNO     = dto.STNOCSTNO;
            entity.TINNOVATNO    = dto.TINNOVATNO;
            entity.Description   = dto.Description;
            entity.CreationDate  = dto.CreationDate;
            entity.Type          = dto.Type;
            entity.Code          = dto.Code;

            dto.OnEntity(entity);

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