Refactoring in the Designer
Refactoring is the process of improving your code without changing its observed behaviour. Familiar refactorings include Rename, Extract Method, etc. The LightSpeed designer provides several commands to help you refactor your model. All of these can be found by right-clicking and choosing Refactor.
Refactoring | Applies To | Description |
Rename | Property or entity | Performs a solution-wide rename, i.e. all references elsewhere in your code to the property or entity are updated. You can optionally keep the property or entity mapping to the same column or table name if you do not also want to rename your database object. |
Create Partial Class | Entity | Creates an empty partial class for the entity, where you can start adding your own code. |
Create Partial Classes | Model | Creates empty partial classes for all entities in the model. |
Convert to Manual Implementation | Property | Removes the automatically generated code for the selected property and copies it into a partial class file (you must have created a partial class file first), so that you can manually edit it, for example to add business logic or error checking. |
Extract Interface | Entity | Creates an interface declaring the properties of the selected entity. (Note that the entity is not automatically declared to implement the new interface: you must add this declaration by hand via a partial class file.) This refactoring is not available in Visual Basic. |