storing an angular UML diagram in a SQL database

Hello,

We are developing an Angular application where the user can create an UML diagram with the syncfusion diagram component. The user will be able to create new and modify existing diagrams, therefore the diagrams need to be stored in the database. We are using MSSQL database and communicating with it through a .NET core REST API with entity framework core. What would be the best way of storing the diagram in the database? Do we need to store the whole DiagramComponent with the whole prototype chain or is there a better way to store only the diagram data, from which the frontend can construct the UML diagram? 


Thank you

1 Reply

AR Aravind Ravi Syncfusion Team May 11, 2020 12:52 PM UTC

Hi Gergely, 
 
By using diagram saveDiagram() public API method we can able to save the diagram. The client-side method saveDiagram() is used to serialize the diagram as a string. This string can be converted to JSON string and stored in your DB for future purposes. We can able to load the diagram from the serialized string using loadDiagram() method. For more information about serialization please refer to below UG documentation link 
 
 
 
Please save a while diagram component in your data base So that while load diagram from data base it gets that diagram instance and nodes are gets properly rendered in diagram. 
 
Regards 
Aravind Ravi 
 
 
 


Loader.
Up arrow icon