As we mentioned in our recent post we added new project templates to Telerik OpenAccess ORM, making it easier than ever to get an application up and running. In this blog we will take a look at each of the new templates, see what they provide, and see how you can leverage them with other Telerik Components.

Using the Templates

These templates are for .NET 4.0; so when adding a new project make sure that .NET Framework 4 is selected in the drop down above the project template list.

image

Web Site Template

To make it easier for developers using Web Site projects, we added a new template that can be accessed by selecting File > New > Web Site in Visual Studio.

image

When the dialog opens, there will be a new item Telerik OpenAccess WebSite

image

When you select this template, two projects will be created. The first will be a normal web site project, and the other will hold a domain model. The Create New Domain Model wizard will open allowing you to configure the domain model. Once configuration is complete, a new RLINQ file will be added to the model project.

image

Project Templates

image

As you can see from the screenshot we provide all of the templates in C#, and VB.NET. Now lets take a look at what each one of these templates provides, starting from the top.

Telerik OpenAccess Class Library

This template makes it a one step process to get started building a domain model using the Visual Designer. When this project template is used, a new project will be added to the solution, and the Create Domain Model Wizard will open. Once the domain model is configured, a new .rlinq file will be added to the project, and the Visual Designer will open.

image

Telerik OpenAccess Fluent Library

This template is for the code-first guys. It will add a new project to the solution, the project will contain an OpenAccessContext implementation, a FluentMappingSource class, and a sample model object. The FluentMappingSource class provides an example mapping to help developers come up to speed quickly when using the Fluent Mapping API.

image

Telerik OpenAccess MVC2 Application

With this template, two projects will be added to the solution. The first will be an ASP.NET MVC 2 application, and the second will be a fluent mapping project set up the same as the Telerik OpenAccess Fluent Library project template.

image

Telerik OpenAccess Web Application

This project type will create a new ASP.NET AJAX web application, and open the Create New Model Wizard. Once you run through the wizard, the new domain model will be added to the web project.

image

Using OpenAccess Project Templates with Telerik Extensions for MVC, or RadControls for AJAX

If you are using the full Telerik toolbox, you might be wondering whether you should use the MVC/AJAX project templates, or one of the new OpenAccess Templates. However, there is no need to worry! You can have the best of both worlds with a few clicks.

To get set up with OpenAccess and MVC, or AJAX:

  1. Create a new project using the Telerik OpenAccess MVC2 Application, or the Telerik OpenAccess Web Application template
  2. Right click on the web project and:

AJAX – Select the RadControls for ASP.NET AJAX menu item, and then click Convert to Telerik Web Application. This will launch the RadControls for AJAX configuration dialog, which will walk you through configuring RadControls for Ajax, adding required files, and adding required references.

image

MVC – Select the Telerik MVC UI Extensions menu item, and then click Convert to Telerik MVC Application. This will launch the Telerik MVC Extensions configuration dialog, which will walk you through configuring the MVC extensions, adding required files, and adding required references.

image

Hopefully this blog will help you get started using the new OpenAccess project templates, happy coding!


About the Author

Ivailo Ivanov

 is Team Lead in Telerik Data Access

Related Posts

Comments