Last month Telerik released its new LINQ implementation and last week we released the new Data Services Wizard for Telerik OpenAccess, which supports both traditional OpenAccess entities and the new LINQ implementation. I will a walk you through the process where you can connect to a database, add a new domain model, wrap it in a new WCF Data Services (Astoria) service, and add a CRUD enabled Silverlight application. All in 30 seconds!
Step 1: Build your Domain Model (20 seconds)
Open Visual Studio 2010 RTM (or 2008) and add a new ASP.NET project. Right click on the project and select Add|New Item and choose Telerk OpenAccess Domain Model from the item template list.
The Visual Entity Designer wizard comes up. Select the database server you are using in the first screen (SQL Server, Oracle, SQL Azure, MySQL, etc) and then also build your database connection string.
Next select the tables, views, and stored procedures you want to map and click finish.
Step 2: Using the Telerik Data Service Wizard to create the service and Silverlight client with CRUD operations (10 Seconds)
Now the easy part. Find the model in your project, it will be by default EntityDiagrams1.rlinq, and right click it to bring up the context menu.
Then select Data Services Wizard|Data Services for .NET 3.5 SP1 Version 2 (Astoria)|Add to Project with new SL Client|Your Project Name. This is the “express” version of the Data Services Wizard. From there it is almost on auto-pilot, you just have to confirm adding the Silverlight Application via the standard Silverlight dialog. All you have to do it hit F5 and run the application!
The wizard will create the new WCF Data Service (Astoria), add a new Silverlight application, add the service references, and build your standard CRUD forms in Silverlight, one for each entity you expose. While I suspect that you will want to skin the application and add some validation, the wizard is great for doing the plumbing work for all of the CRUD operations-leaving you to worry about the design and the business logic. We are going to add more to this wizard in the future, things like more control over the layout and validation, play around with it and let us know what is important to add!
Page rendered at Tuesday, February 18, 2020 5:27:33 PM (Eastern Standard Time, UTC-05:00)
The opinions expressed herein are my own personal opinions and do not represent
my employer's view in anyway.