During the development process today, when using the Kendo UI, you can obtain data through ef. When the image page is displayed, the data stored in the data needs to be converted to another display. For example, if the database field is saved as "S", the display on the page is success, the first response is to use the for loop when getting data in the background, and then convert the specified field to the specified data through the switch case, in this way, data can be directly obtained on the page, and the function is initially implemented.
But another problem arises. It is the time for filtering in the front of the page. Because the data is displayed as "success", but the actual query is "S", it is stored in the data format, so on the page, the query data we use is always unable to be queried in the background. I thought that if the data saved in the database is also the format I need "success", then we can directly query it, so the view is used. When SQL is used to query data,
Use the case field when data then data end to directly convert the data to the desired format.
In the development process, especially when presenting data, we can consider using views and concatenate the data we need using simple SQL statements. views are not usually used, this should be frequently used, especially when using the Kendo UI, paging is implemented by Kendo, and using views is a medium and efficient method.