I used to work with java and SQL where we can have SQL.properties kind file where we can mention a query and data is returned
query = "select * from tablename"
But in .net how can we write a query and fetch data instead of methods provided by dynamodb like getitemasync() or async()
2
Answers
Writing static queries as string sounds like problem when you have to insert many dynamic values.
Can you use the library specifically provided for using DynamoDB under .net ?
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/ItemCRUDDotNetDocumentAPI.html
Well first of all, let me recommend you do not do that, but instead investigate entity framework, you really have to start using code first automatic binding.
But for legacy point you can use a package System.Data.SqlClient for super duper manual handling of every f’ing thing … jup done it for ages, once.
So but if can choose don’t do this, instead investigte entity framework, you don’t need to work hard when you can work smart:
https://learn.microsoft.com/en-us/ef/core/get-started/overview/first-app?tabs=netcore-cli
You will really spend months less for the investment of weeks if you cross this chasm