You are not logged in.
Pages: 1
Hi ab!
This is my first post on the forum and the first doubt.
I'm creating a MVC project with mORMot ...
On the client side i have multiple screens of the type CRUD:
1- Create TSQLHttpClientWinHTTP for each CRUD only with TSQLModel table used?
2 - Create TSQLHttpClientWinHTTP only once for all the project with TSQLModel creating all tables?
What is better?
Thanks,
Sergio Schelbauer
Offline
The best is to create one single client instance, which would be used from the UI thread.
What is mandatory, in the mORMot way, is to share the same data model on both client and server sides, with the same tables in the same order on both sides.
This is why we usually put all TSQLRecord in a shared unit, with no dependency on the server or client part.
Then define a single function to create the same TSQLModel on both sides.
See e.g. https://github.com/synopse/mORMot/blob/ … CModel.pas
and https://github.com/synopse/mORMot/blob/ … leData.pas
Offline
Pages: 1