My app is currently using ADO.NET with SQL commands used everywhere.
I read thru XPO and find that it is quite involve converting it to XPO. Can I still use SQL Commands (SELECT, UPDATES etc) if I convert to XPO?
My only interest in converting to XPO is to use grid "server load". From my understanding, to get the performance, I must use XPO. Is that correct?
As far as I understand, you are interested in the Server Mode feature. There are various technologies that can be utilized to enable this feature: XPO, LINQ, and Entity Framework. Please refer to the Server Mode help topic for additional information.
If you are interested in XPO, I believe that the following documentation article will be helpful for a start: Querying a Data Store. I also suggest that you read the XPO Tutorial to get a clear imagination about this technology.
You can also execute SQL queries in XPO directly, as Brendon suggested, but this approach cannot be used together with Server Mode.
You can execute queries and stored procedures via Xpo, but only v2012 will return the metadata (such as column names) with the result record set. Also, the direct query method does not support parametrized queries unless you are using the newest version.
For example, you can execute a standard Sql query using the Session.ExecuteQuery method:
The Session class also has methods to execute a scalar query or a stored procedure.
If you were to just execute hard-coded SQL strings or stored procedures, I don't think you'd get much benefit out of the Xpo product, unless you want your application to work with multiple database platforms. The real value of the Xpo product is that you can work with objects in a relational manner.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.