Quino v3.0: Metadata builders and code-generation improvements
Published by marco on
The summary below describes major new features, items of note and breaking changes. The full list of issues is also available for those with access to the Encodo issue tracker.
Highlights
- Metadata builders are more lightweight now and have fewer restrictions on their API. (QNO-4994)
- Improve support for plugins (QNO-5189, QNO-5190, QNO-5196)
- Improve and clean up expression library (QNO-5174, QNO-5176, QNO-5182, QNO-5183, QNO-5184, QNO-5188, QNO-5198, QNO-5205)
- Improve schema-migration tools (QNO-5179, QNO-5206, QNO-5212, QNO-5213)
Breaking changes
IDataSession
andIApplication
now directly implement theIServiceRequestHandler
and helper methods that used to extendIApplication
now extend this interface instead, so calls likeGetModel()
can now be executed against anIApplication
or anIDataSession
. Many methods have been moved out of theIServiceRequestHandler
interface to extension methods declared in theEncodo.IOC
namespace. This move will require applications to update theusings
. ReSharper will automatically find the correct namespace and apply it for you.- Similarly, the extension method
ApplicationExtensions.GetInstance()
has been replaced with a direct implementation of theIServiceRequestHandler
byIApplication
. MetaBuilder.Include()
has been replaced withDependencies.Include()
- When you call the new version of
CreateModel()
, you can no longer callCreateMainModule()
because the main module is set up automatically. Although the call is marked as obsolete, it can only be combined with the older overload of theCreateModel()
. Using it with the newer overload will cause a runtime error as the main module is added to the model twice. The various methods to create paths with the
MetaBuilder
have been replaced byAddPath()
. To rewrite a path, use the following style:Builder.AddPath( Elements.Classes.A.FromOne("Id"), Elements.Classes.B.ToMany("FileId"), path => path.SetMetaId(new Guid("…")).SetDeleteRule(MetaPathRule.Cascade), idx => idx.SetMetaId(new Guid("…")) );