Server Error in '/' Application.

No row with the given identifier exists[Model.T_Product#246]

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: NHibernate.ObjectNotFoundException: No row with the given identifier exists[Model.T_Product#246]

Source Error:


Line 20: 			if (ProductID != -1 && ProductID != 0)
Line 21: 			{
Line 22: 				model = BLL.BllBase<Model.T_Product>.GetId(ProductID);
Line 23: 				int CategoryID = model.CategoryID;
Line 24: 				litMap.Text = BLL.BllBase<Model.T_Category>.GetId(CategoryID).TitleEn;

Source File: d:\1\867215\html\en\product.aspx.cs    Line: 22

Stack Trace:


[ObjectNotFoundException: No row with the given identifier exists[Model.T_Product#246]]
   NHibernate.Impl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id) +37
   NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +208
   NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options) +134
   NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType) +427
   NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType) +150
   NHibernate.Impl.SessionImpl.Load(String entityName, Object id) +195
   NHibernate.Impl.SessionImpl.Load(Type entityClass, Object id) +128
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) +107

[NotFoundException: Could not find T_Product with id 246]
   Castle.ActiveRecord.ActiveRecordBase.FindByPrimaryKey(Type targetType, Object id, Boolean throwOnNotFound) +263
   Castle.ActiveRecord.ActiveRecordBase`1.Find(Object id) +65
   DAL.DalHelper`1.ext_GetId(Int32 id) +112
   BLL.BllBase`1.GetId(Int32 id) +83
   en_product.Page_Load(Object sender, EventArgs e) in d:\1\867215\html\en\product.aspx.cs:22
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1031