Вопрос

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?

Это было полезно?

Решение

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top