Question

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?

Was it helpful?

Solution

I have a generic solution for extracting metadata from NHibernate. See link https://weblogs.asp.net/ricardoperes/nhibernate-metadata.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top