Avectra.netForum.Data.DynamicFacade
DynamicFacade is a subclass of FacadeClass. DynamicFacade populates its Data Objects from the metadata set up on the Object setup in the Toolkit when base.InitializeObjects(ObjectKey) is called in the constructor of the class.
Unless your class requires a complex way of creating and managing Data Objects, a DynamicFacade subclass is the preferred way of creating a static facade class because it does not require you to write code for the core CRUD methods (SelectByKey, LoadRelatedData, Insert, Update, Delete, HardDelete, SoftDelete). Create a FacadeClass override only where you need a more complex way of loading data objects.
Properties
- szObjectKey (string). Not used. If you need to know the object key, use base.ObjectKey
Methods
- InitializeObjects - Pass the Object Key to load the object's Data Objects.
See the methods in Avectra.netForum.Data.FacadeClass for more information. The most commonly overridden methods are:
- Insert, Update and Delete. If you need something to fire in both Insert and Update, then you must override both.
Case Study
- DynamicFacade Override - Example of creating a custom class library for a custom Facade Object that inherits from DynamicFacade.
- DynamicFacade with Virtual Field