Hi,
I got requirement to develop a weakly type webservice to provide interface for multiple application to access database. One of interface I defined as following.
public DataTable Query(string tableName, string[] fields)
{
}
I have to validate whether parameter is valid base on database schema. For example, check table of tableName is existing on database. check field in fields list is valid in table. So, I just want to know whether LLBLGen Pro 2.5 has curtain funtions to map between real table and table entity.
BTW, I know I can use following code to get column list and real table name based on the entity. But how can I get entity based on table name?
IPersistenceInfoProvider info = PersistenceInfoProviderSingleton.GetInstance();
IFieldPersistenceInfo[] fieldInfos = info.GetAllFieldPersistenceInfos(new TableEntity());
foreach (IFieldPersistenceInfo item in fieldInfos)
Console.WriteLine(String.Format("Table {0} Column {1};",item.SourceObjectName, item.SourceColumnName ));