IDataTranslateCommand Interface
Optional interface that allows an entity to translate or redirect a command name
before the data access layer executes it. Useful when multiple logical operations
should map to the same stored procedure, or when a command name needs to be
dynamically resolved at runtime.
Namespace:
AdvantageCMS.Data.InterfacesAssembly: AdvantageCMS.Data (in AdvantageCMS.Data.dll)
Remarks
Examples
C#
public class CustomerData : IDataAccessable, IDataTranslateCommand { public bool UseArchiveDatabase { get; set; } public string GetCommandToExecute(string commandName) { // Redirect reads to the archive procedure when flagged if (commandName == "Customer_GetByID" && UseArchiveDatabase) return "CustomerArchive_GetByID"; return commandName; } // ... IDataAccessable members ... }

