Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error.. in sample code.
Message
 
To
All
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Error.. in sample code.
Miscellaneous
Thread ID:
01187456
Message ID:
01187456
Views:
98
Three points..
#1

When I paste in the following to orders.cs (( as in the Jump Start: Creating Business Objects - C# - step 6 ))


public ListGetOrdersByCustomerID(string customerID)
{
return this.GetEntityList("SELECT * FROM Orders WHERE CustomerID = @CustomerID",
this.CreateParameter("@CustomerID", customerID));

}

I recieve the following error.

Error 8 Cannot implicitly convert type 'System.ComponentModel.BindingList' to 'System.Collections.Generic.List' C:\MM .NET Jump Start\Order System Business Objects CSharp\Orders.cs




#1.a
If I change List to BindingList.. it complies BUT the GetOrdersByCustomerID method is not visible/selectable in the object test bench as shown in the jumpstart tutorial. what is the correct way to fix the above error and have the method appear in the test bench??


#2
also in Jump Start: Creating Business Objects - C# Step 8: Enhancing the OrderDetail Business Object

I do not see a DSL Model File prompt in the Specify the Code Generation Settings page in my version of the MM .NET Business Layer Generator...tool.. could one explain this feature?..



#3
also in Jump Start: Creating Business Objects - C# Step 8: Enhancing the OrderDetail Business Object under Creating OrderDetail Data Retrieval Methods

the following..

public List GetOrderDetail(int? orderID)
{
List OrderDetailList;

if (orderID != null)
{
OrderDetailList = this.GetEntityList("GetOrderDetailByOrderID",
CommandType.StoredProcedure,
this.CreateParameter("@OrderID", orderID));
}
else
{
this.GetEmptyDataSet();
OrderDetailList = new List();
}
return OrderDetailList;
}
}


produces the following error..
Error 8 Cannot implicitly convert type 'System.ComponentModel.BindingList' to 'System.Collections.Generic.List' C:\MM .NET Jump Start\Order System Business Objects CSharp\OrderDetail.cs

If I change List to BindingList it causes the flowing error in AAppTest.cs


Error 8 Cannot implicitly convert type 'System.ComponentModel.BindingList' to 'System.Collections.Generic.List' C:\MM .NET Jump Start\Order System Business Objects CSharp\AAppTest.cs

If I change List to BindingList in AAppTest.cs it builds..

what concerns me is in Step 9: Testing the OrderDetail Business Object I do not see in the Object Test Bench the following methods..
TestOrderDetailDefaults(int,int)
and TestOrderDetailRules()

in substep 6 Right-click the AAppTest object and select Invoke Method | TestOrderDetailDefaults(int, int) from the shortcut menu:

I wish to know what is the correct path to follow.. or what was the root of the problem and what is the best method / pattern to follow.. any explainations would be appreciated.


thanks..
Next
Reply
Map
View

Click here to load this message in the networking platform