Tables are not getting create in FNHMVC database

Nov 26, 2014 at 9:26 AM
Edited Nov 26, 2014 at 9:29 AM
Hi,

I wanted to work on the application. I am using SQL Server 2008 R2 and Vs2012 with MVC5.
Whenever it try to execute the application the connectionhelper code run successfully but when trying to open category page getting exception
NHibernate.Exception.GenericADOException

" {"could not execute query\r\n[ select category0.CategoryId as CategoryId0_, category0_.Name as Name0_, category0_.Description as Descript3_0_ from [Category] category0_ ]\r\n[SQL: select category0_.CategoryId as CategoryId0_, category0_.Name as Name0_, category0_.Description as Descript3_0_ from [Category] category0_]"}"_

InnerException : {"Invalid object name 'Category'."}

Also found that none of the table got created in the database. My connection string is correct, not able to understand the issue. Kindly help.

Thanks.
Coordinator
Nov 26, 2014 at 9:51 AM
Hello,

You need to create the database before you execute the app. To do this there is a unit test called CreateSchema that you need to execute. Also don't forget to setup the connection string in the test project.

-Cheers,
Fabricio
Marked as answer by Anjolia on 11/26/2014 at 9:49 PM
Nov 27, 2014 at 5:16 AM
Thanks It works. Is there any step by step documentation which I can use to understand the application better.