Task 3 – Dynamic SQL query generation using currying and partial application
Use currying to build a function for dynamic query generation for tower defense game data and partially applied functions for querying enemy types and levels. Use the following function to generate query scripts:
Func<string, string, string, string> generateSqlQuery = (table, column, value) => $"SELECT * FROM {table} WHERE {column} = '{value}'";
These tasks should be already familiar to you since they were discussed in previous chapters. However, you still might feel that there is room for improvement in your mastery of composition, currying, or partial application. If so, you are more than welcome to proceed with reading this chapter.