How can I keep data with {} parameters in json format in my table and how can I use it in C#?

48 views Asked by At

A few of my friends and I have been looking at this issue for a few days, but we couldn't figure it out.

There are many texts to be used in the UI. These texts contain fields such as title, content and type. I want to keep these texts in a table in SQL SERVER. For this I created something like this.

SELECT template *FROM MyTable

template ==> [{"Title" : "abcdef", "Content" :"ghi1234", "Type" :1, "Price" {0}}]

How can I keep these texts in json format in my table, what is the best way and how can I use them in the service in C#? In this way, I will return this json format and the parameters in the format from the service and the UI side will be able to use it.

By the way, we are not working with very new technologies yet. We do not use .NET Core or MVC, unfortunately

//For exmp = return (String.Format(sablon.Price,parameter1)) maybe, I don't know

I tried to express my question with an example. I hope it was understandable. It would be nice to hear different perspectives and solutions or any ideas.

0

There are 0 answers