SessionBaseReplacePersistedType Method (String, Type) |
Updates the
Type assocuiated with a
VelocityDbType. This can be used when you want to rename a class or move a class to a different namespace.
You will need to have the prior
Type loaded as it it is defined in the current
Schema for this to work. Once the update has been done, you should no longer need
to keep the old
Type loaded. Be sure to backup all your data before doing this.
Namespace:
VelocityDb.Session
Assembly:
VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax public bool ReplacePersistedType(
string oldTypeFullAssemblyName,
Type newType
)
Public Function ReplacePersistedType (
oldTypeFullAssemblyName As String,
newType As Type
) As Boolean
public:
bool ReplacePersistedType(
String^ oldTypeFullAssemblyName,
Type^ newType
)
member ReplacePersistedType :
oldTypeFullAssemblyName : string *
newType : Type -> bool
Parameters
- oldTypeFullAssemblyName
- Type: SystemString
The assembly qualified name of the Type currently used within the Schema - newType
- Type: SystemType
The Type you want to replace with in the Schema. This new Type must NOT already be part of the schema.
Return Value
Type:
Booleantrue if old type name was found; otherwise false
See Also