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

            var dto = new tblCompanyDTO();

            dto.CompanyId        = entity.CompanyId;
            dto.CompanyName      = entity.CompanyName;
            dto.Address          = entity.Address;
            dto.PhoneNo          = entity.PhoneNo;
            dto.Description      = entity.Description;
            dto.ServiceTaxRegdNo = entity.ServiceTaxRegdNo;
            dto.PolicyNo         = entity.PolicyNo;

            entity.OnDTO(dto);

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

            var entity = new tblCompany();

            entity.CompanyId        = dto.CompanyId;
            entity.CompanyName      = dto.CompanyName;
            entity.Address          = dto.Address;
            entity.PhoneNo          = dto.PhoneNo;
            entity.Description      = dto.Description;
            entity.ServiceTaxRegdNo = dto.ServiceTaxRegdNo;
            entity.PolicyNo         = dto.PolicyNo;

            dto.OnEntity(entity);

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