Start Visual Studio, create a new project, and use the Template MDrivenEcoSpaceAndModelProject:
Delete EcoSpace and PMP since we only want the model.
Open the EcoProject1.ecomdl. Delete the existing content, Classes, Views, and Actions, then:
In the MDriven tab, use Import modlr (if you currently have your model in ecomdl, save it as modlr in order to import everything):

Are you using NetFramework4.7+? -> Install/update Nuget packages.
Are you using .netCore or .net6+? -> Create a .net6 project; move the model file to this project, and install Nuget packages: MDriven.Interfaces, MDriven.Handles, MDriven.LinqExtender.
Remember to move your <modelname>_AssetsTK into the project, at the same level as the ecomdl file.
Build. Then Codegen:

From this point forward, use VS to upload.
From this point forward, you must press Codegen whenever you do anything that affects the model structure (classes, associations, statemachines).
From this point forward, you must build your project (F5 in VS) prior to upload so that the latest build is used for CodeDress.
Now when you add a Method to a Class and leave the Body(eal) field empty, a stub is generated in C#:

The great thing with CodeDress is that you now have access to the complete model from C# and can use third party logic from Assemblies/Nugets and call those from your model code.
We, however, suggest you refrain from putting ALL your logic (derivations, etc.) in C# even if you CAN, since it hampers the cross-reference and look-ahead-smartness that MDriven can provide by inspecting OCL expressions—but it is a great complement to give you zero limitations in your system building.
