/// <summary> /// Converts this instance of <see cref="planDto"/> to an instance of <see cref="plan"/>. /// </summary> /// <param name="dto"><see cref="planDto"/> to convert.</param> public static plan ToEntity(this planDto dto) { if (dto == null) { return(null); } var entity = new plan(); entity.i_PlanId = dto.i_PlanId; entity.v_OrganizationSeguroId = dto.v_OrganizationSeguroId; entity.v_ProtocoloId = dto.v_ProtocoloId; entity.v_IdUnidadProductiva = dto.v_IdUnidadProductiva; entity.i_EsDeducible = dto.i_EsDeducible; entity.i_EsCoaseguro = dto.i_EsCoaseguro; entity.d_Importe = dto.d_Importe; entity.d_ImporteCo = dto.d_ImporteCo; entity.v_ComentaryUpdate = dto.v_ComentaryUpdate; dto.OnEntity(entity); return(entity); }