Consider this code that I use:
esqlString = "SELECT VALUE e FROM " + typeof(T).Name + "s AS e";
As you see, I've got generic class of <T> where T : Entity
So, when I need to get records for this entity - I use query above. Problem is that I have to add "s" to specify that I'm querying collection of <T>
1. I wonder if I can somehow use entityManager to get collection name if I know typeof(T) ? My main concern is that I'm hardcoding and I'm not sure how pluralizing really works. will it add "s" everywhere or there is exception list and I will get bitten by this one day?
2. I noticed that when I started using entity SQL - I don't get caching anymore. I wonder if there any techniques where I can achieve dynamic query and also retain caching? To get you an idea why I'm using esql: