Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Connection string for Entity Framework project
Message
From
13/12/2011 11:38:13
 
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Help with Connection string for Entity Framework project
Miscellaneous
Thread ID:
01530977
Message ID:
01530977
Views:
112
Hi:

SORRY for the TITLE!! I realised later that the connection string is good as the Query is returning 3 records as expected.
**************
I am starting on MM .net for 2010.

Just created the EF project and then the test project using VS2010 build in Testing tool.

Getting the following message when running the test method "GetOrderDetail":

System.NullReferenceException was unhandled by user code
Message=Object reference not set to an instance of an object.
Source=OakLeaf.MM2010.Framework
StackTrace:
at OakLeaf.MM.Main.mmAppBase.get_DatabaseMgr()
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataAccessObject(String databaseKey, Boolean localDataAccessObject)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataAccessObject(String databaseKey)
at OakLeaf.MM.Main.Business.mmBusinessObject.GetDataAccessObject()
at OakLeaf.MM.Main.Business.mmBusinessObjectHelperEF.GetEntityList[T,EntityType](IQueryable`1 objectQuery, MergeOption mergeOption, Boolean isSecondaryList, mmBusinessObjectGeneric`1 businessObject)
at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntityList[T](IQueryable`1 objectQuery, MergeOption mergeOption, Boolean isSecondaryList)
at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntityList[T](IQueryable`1 objectQuery, MergeOption mergeOption)
at OakLeaf.MM.Main.Business.mmBusinessObjectGeneric`1.GetEntityList(IQueryable`1 objectQuery)
at ACME.OrderSystem.BusinessEF.OrderDetail.GetOrderDetail(Nullable`1 orderID) in C:\mm.netJumpStart\Order System BO EF\OrderDetail\OrderDetail.Partial.cs:line 48
at TestProject1.UnitTest1.TestGetOrderDetailByOrderID() in c:\mm.netJumpStart\TestProject1\UnitTest1.cs:line 68
InnerException:

The offending line of code is :
orderDetailList = this.GetEntityList(query);

The SQL Query is returning 3 rows as expected but somewhere these rows are not getting converted to the Order Detail Entity object.

Please help!!!

Navneet
Next
Reply
Map
View

Click here to load this message in the networking platform