Code-First database in UE5

Overall speaking, has anyone tested, tried, heard a friend, has a tutorial, sample-code, etc… using a code-first database from C# EF core, and its entities/classes in a Unreal Engine project/environment?

Has any one managed to succeed with /clr?

Not talking about MSsql connectors. I know those exist and work fine.

I am investigating interoperability between C++ and C#. Where C# is the only language that has code-first-database approach (EF and Hibernate).

We tried probably 5+ years ago to get C# code working. Sunk many dev hours into it and no luck. Enabling CLR seemed to not work at all. The various C++ to C# interop and DLL import methods the code is just nasty and less debug-friendly in C++.

In the end, the best way was to write our DB and TCP interface code in C++. That way you can just communicate with any C# app by standardized SQL or TCP calls. Anyone can read the code and it is debuggable on both sides.

It might be different years later though …

1 Like