Click here to Skip to main content
15,892,697 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i have planning to learn Microsoft SilverLight.During that time i got an question that without using WCF service cannot we access database or is it possible with ADO.NET.
Please reply with an example.And one more thing that suggest me any good material to learn silverlight quickly.
Posted

No,we cannot call ADO.NET code directly from a Silverlight application because Silverlight does not consist of ADO.net. But Silverlight does have WCF, hence we can create a WCF service which does database operations and Silverlight application will make calls to the same.

Read this article:

7 Simple Steps to Connect SQL Server using WCF from SilverLight[^]


hope it helps :)
 
Share this answer
 
v2
Comments
ks ravi 11-Nov-11 1:55am    
thanks for your reply.Please suggest any good material to learn SilverLight quickly.
Uday P.Singh 11-Nov-11 2:26am    
what do you mean by quickly? To learn anything from scratch will definitely take time initially be patience. Google is your friend try to find articles, e-books etc. You can accept the answer if it helped you.
Mark Salsbery 11-Nov-11 11:10am    
Also you don't HAVE to use WCF. You can use any communication provided by Silverlight. WCF definitely saves you some work though. RIA services can save you even more (http://msdn.microsoft.com/en-us/library/ee707344%28v=VS.91%29.aspx). The Silverlight Business Application project template is a good place to start...
Uday P.Singh 11-Nov-11 13:53pm    
Yes but certainly can't use ADO.net directly to interact with data source.
Mark Salsbery 14-Nov-11 10:42am    
WCF and database access have nothing at all to do with each other, nor did I imply they did.
No you can't access database in silverlight directly.

You can do it by WCF Services or WCF RIA Services.

Check out Silverlight Samples[^]

Regards,
Sagar Solanki
 
Share this answer
 
You can not use any ADO.NET classes (infact they are not included in sl) inside silverlight (sl), because the silverlight is in user's browser, and your ADO.NET can be in your server...

silverlight application is a Rich Intenet Application (RIA), means it has rich set of user interaction tools inside the browser, whatever happens can only happen in browser... or it call make call to services i.e. ASP.NET webservice, WCF services, RIA services.. etc...


its a good place to learn silverlight/wpf...

go through it. :)

http://www.wpftutorial.net/[^].

if satisfied mark as answer.. for more clarifications comment below :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900