Just to add my perspective. I have been using a variety of LP and MILP solvers for almost 30 years, and almost always create the model directly into the solver using one of the APIs from Java, C# or C++
I have often used some export functions from some of those solvers to output a copy of the model as an LP file, but that is just for checking or debugging what I have put into the solver using an API.
I definitely would not ever construct my model as a text file (in LP or MPS format or whatever) or even in a (large) text string structure to read into a solver. It would seem crazy to render the structures of the model into a text form, and then make the solver parse that text to recover the model again.
By far the simplest and most efficient approach is to directly enter all your variables and constraints directly into the solver using one of the APIs.