none
Accessing data from SQL Server 2005 (WPF-WCF) RRS feed

  • Question

  • Hi,

    We are developing Windows Application using WPF, WCF. Database is SQL Server 2005 (existing), I need your valuable input on the best approach for accessing data.

    We tried following options:

    1. Entity Framework - It worked fine for strong return type, it added more complexities if there are multiple result sets or accessing some piece of data from result set and so on.. Also it enforced us to restructure the input parameters to the sql stored procedure.

    2. ADO.Net - It looked good but not sure its the best ease way.

    3. Entity Framework - Function Imports - Its tough to deal with if the response of stored proc changes based on parameter types. It doesnt support.

    So, I would like to know - the best way to access data (extract one cell data out of result set, access data with multiple result sets and other scenarios). We are still in early stages for deciding approach, your input will be highly appreciated. Thank you.

    Regards,


    Nagesh Maddala


    • Edited by Nagesh Maddala Thursday, April 12, 2012 4:01 AM
    • Moved by Sheldon _Xiao Monday, April 16, 2012 4:50 AM (From:Windows Presentation Foundation (WPF))
    Thursday, April 12, 2012 3:57 AM

Answers

  • Hi Nagesh,

    Welcome!

    Why do not try WCF Data Service in this scenario: http://msdn.microsoft.com/en-us/data/bb931106

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 16, 2012 8:54 AM
    Moderator
  • Hi Chen,

    Thanks for the input. Looks like it insists us to use Ado.net and Entity Framework for data access.

    For now we have decided - Use Entity framework (function imports) and Command Execution approaches based on return type of stored producedure(single or multiple result sets).

    Please let me know if there is any other alternative way to access microsoft sql server database. Thank you.

    Regards,

    Nagesh


    Nagesh Maddala

    Monday, April 16, 2012 4:36 PM

All replies

  • Hi Nagesh Maddala,

    Based on your description, your concern is more relative to "ADO.NET Entity Framework and LINQ to Entities" forum, so I will move your thread to that forum to get better support.

    Best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 16, 2012 4:46 AM
  • Hi Nagesh,

    Welcome!

    Why do not try WCF Data Service in this scenario: http://msdn.microsoft.com/en-us/data/bb931106

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, April 16, 2012 8:54 AM
    Moderator
  • Hi Chen,

    Thanks for the input. Looks like it insists us to use Ado.net and Entity Framework for data access.

    For now we have decided - Use Entity framework (function imports) and Command Execution approaches based on return type of stored producedure(single or multiple result sets).

    Please let me know if there is any other alternative way to access microsoft sql server database. Thank you.

    Regards,

    Nagesh


    Nagesh Maddala

    Monday, April 16, 2012 4:36 PM
  • Hi Nagesh,

    Entity Framework is also build on Ado.net, all the Linq Queries are translated to "T-SQLs" by EF provider, but it is a good way to access SQL, thanks.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, April 19, 2012 8:20 AM
    Moderator