How to get actual table name and execute SQL statement?

Topics: Administration, Customizing Orchard, General, Writing modules
Mar 6, 2014 at 3:02 PM
I'm trying to execute an sql statement in Orchard. My first problem is how to get the actual table name.

I created a table based on this class using Migration.cs:
public class Product 
{
   public int ProductId {get;set;}
   public string ProductDescription {get; set;}
}
What is the proper way to get the table name for Product knowing that orchard prefix it based on module name and during setup. Also, what is the best way to execute a generated batch SQL statements in Orchard?

Thanks.
Developer
Mar 8, 2014 at 2:07 AM
I don't know from the top of my head but take a look at how migrations work (DataMigrationInterpreter for example).