Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetEntity and CommandType
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01260368
Message ID:
01260461
Vues:
9
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform