Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetEntity and CommandType
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01260368
Message ID:
01260461
Views:
8
Just add the CommandType as the second parameter:
this.GetEntity("SELECT * FROM Orders WHERE OrderID = @OrderID", ComandType.Text,
this.CreateParameter("@OrderID"));

If you look at the intellisense for GetEntity it's the fifth overload.


>>The GetEntity() method (as well as all Get***() methods) have an overload that accepts the CommandType. So you can specify your DefaultCommandType and then override it where needed in your business object methods by specifying the CommandType in your call to GetEntity().
>>
>
>Kevin - can you give me an example with the following. Assume I have stored proc as the default, but I wont to make this direct SQL call:
>
>return this.GetEntity("SELECT * FROM Orders WHERE OrderID = @OrderID", this.CreateParameter("@OrderID", ...));
>
>How would I overload it?
Regards,

E.R. Gilmore
Previous
Reply
Map
View

Click here to load this message in the networking platform