rappen / FetchXMLBuilder

FetchXML Builder for XrmToolBox and Microsoft Dynamics 365 / CRM
https://fetchxmlbuilder.com/
GNU General Public License v3.0
135 stars 56 forks source link

Create QueryExpression with Early Bound Generator style #808

Closed rappen closed 1 year ago

rappen commented 2 years ago

Today it only used late-bound for the generated code. Make it optional to create early-bound code.


bwmodular commented 1 year ago

Hi Jonas, really liking the new EBG style queries for entity and column names. It'll make flipping back and forth between FXB and IDE much easier. What would help even more would be if this could be extended to the use of Option Set Enums, such as: query.Criteria.AddCondition("statecode", ConditionOperator.Equal, (int)ContactState.Active);

These are the EB features that are most useful, I think, because they not only help avoid typos but also help enormously in the readability of queries. Is this doable? Is it something you'd consider? At the moment this is the biggest pain point for us using EBG as cutting and pasting between FXB and VS entails a lot of rewriting every time.... Thanks as ever for an amazing and every improving tool.

rappen commented 1 year ago

Totally agreement on that!

Implementing EBG has now got me to start thinking about, and actually right now working on it, to really do it Early Bound. Not only using the constants for "late bound code with constants", but using Daryl's QueryExpressionFactory and Tanguy's FluentQueryExpression. That's more "early bound" than what we have today. (Daryl need to document a bit about this feature...) Any more options for early bound queries out there? Which where?

Would that look even better? See #822 and #828.

Either way, I will try to implement Condition on OptionSet! Would you like to create a new issue for that? 🙂

bwmodular commented 1 year ago

Thanks Jonas - I created https://github.com/rappen/FetchXMLBuilder/issues/829 for this.