/// <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); }