Getting Table Name from HostContext Metadata

I am getting all the Operation DTO’s from Servicestack like this

var operationDtos = HostContext.Metadata.GetOperationDtos();
var schemaName = meta.Schema //I assume this is the schema, but it is blank
var aliasName = meta.Alias

How do I get the underlying table name for the specific dialect provider.

So I am looking to extract the underlying database table name, schema name and alias from the operationDtos based on underlying dialect provider.

E.g. in postgres I might get table account_type, schema public etc…While in sql server I will get table AccountType schema dbo

If the Schema is defined it will be on the [Schema] Attribute that you can use reflection on the Model Type to resolve.

I am looking for the table name as well. E.g. CreateAccountType (created by AutoQuey), should give me the table name AccountType for SQL Server and account_type for Postgres.

The table is name is the class name unless it’s overridden by the [Alias] attribute which you can get from the Model Type as well.

I don’t understand. When I get Hostcontext.Metadata.GetOperationDtos(),

I get things like CreateAccountType, DeleteAccountType, UpdateAccountType and PatchAccountType.

I don’t get anything from the operation metadata where I can see a class name or something that is equal to the AccountType which is the table name

They’re not there, read my comments for how to access them.