I need to write something in C #, which allows users to request data in a format convenient for humans. Therefore, they will enter the following in the text box:
Students.Class, name, address, classid, grade
This will lead to:
Marcus, 11B Westbury Ave. 200718, A+
What needs to be done above: Look in the DB students by joining the class table, then extracting the name, address, class, class.
I tried to write my own parsing method, breaking the string into an array and then based on the data in the array, querying the database. However, the problem I'm currently facing is that some users make syntax errors:
Students, name, address, classid, grade
(Missing .class bit). Therefore, I need to drop the try / catch methods and present the user with error messages.
, , - , , ?