Hello Team,
The custom table that i have added does not appear in uCommerce database.
Here are the steps i followed
I have created a separate class library application
Added connection string in App.config, connection string named "connectionStringKey"
Added a table name "Test" that inherits IEntity interface
public virtual int Id { get; set; }
public virtual string TestName { get; set; }
A Map Class named "TestMap"
public class TestMap:ClassMap
A helper class and function to create session factory like this
public static ISessionFactory CreateSessionFactory()
{
return Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2012
.ConnectionString(c => c.FromConnectionStringWithKey("connectionStringKey")))
.Mappings(m => m.FluentMappings.AddFromAssemblyOf
added NihibernateMappingTag class
public class NHibernateMappingTag: IContainsNHibernateMappingsTag
{
}
In a program class added this method to create sessionfactory
public void CreateTables()
{
using (var iSession = SessionHelper.CreateSessionFactory()){}
}
Referred this dll in our Installer application
under umbraco/ucommerce created Apps folder under this Test Folder and added Mappings.config file and her added the component
we have a class which is inheriting IPackageAction interface. In Execute method i am calling CreateTables method like this
new CustomTables.Program().CreateTables();
after doing all this i am building whole application and then deploying it on our umbraco site
then building ucommerce store package
then installing it form umbraco backoffice /developer /packages/install local
Installation is success , but the custom table is not added into our ucommerce database
Please help to fix this. I have already spent too much of time on this. Is there anything i am doing wrong or am i missing something ?
guide me to fix this
Custom table is not added to ucommerce database
Hello Team, The custom table that i have added does not appear in uCommerce database.
Here are the steps i followed
under umbraco/ucommerce created Apps folder under this Test Folder and added Mappings.config file and her added the component
we have a class which is inheriting IPackageAction interface. In Execute method i am calling CreateTables method like this new CustomTables.Program().CreateTables();
after doing all this i am building whole application and then deploying it on our umbraco site then building ucommerce store package then installing it form umbraco backoffice /developer /packages/install local
Installation is success , but the custom table is not added into our ucommerce database
Please help to fix this. I have already spent too much of time on this. Is there anything i am doing wrong or am i missing something ? guide me to fix this
is working on a reply...