This is a migrated thread and some comments may be shown as answers.

Problem with Telerik OpenAccess Domain Model

1 Answer 299 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sudhanshu Tripathi
Top achievements
Rank 1
Sudhanshu Tripathi asked on 14 Jul 2010, 11:25 AM
Hi, I am using Telerik OpenAccess Domain Model and follow serveral steps to use open access in WebApplication

1- Creat new project with Name OrmProject using VS2008.
2-configure enable project to use ORM.(Telerik.OpenAccess,Telerik.OpenAccess.35.Extensions refrences are created)
3-right click on solution explorer, click add new item and select OpenAccess Domain Model.
4-configure OpenAccess Data model wizard
5-classes corresponding to all tables are created.
6- Build the project.

7-rigt click on solution explorer, click add new project and select asp.net web application with Name OrmWeb.
8-select OrmWeb folder in solution explorer and configure enable project to use Orm (Telerik.OpenAccess,Telerik.OpenAccess.40.Extensions refrences are created)
9-Add web referece of OrmProject  in OrmWeb application folder.
Now using Telerik.openAccess namespace and drag and drop radgrid on default.aspx page and use configure data source in radgrid and select openaccess data source
and configure it.
data are bound in radgrid it means all table columns are displayed in radgrid but when i build the project the get following errors
in default.aspx.designer.cs
Error 23 The type or namespace name 'OpenAccessDataSource' does not exist in the namespace 'Telerik.OpenAccess' (are you missing an assembly reference?) E:\Sudhanshu\OrmProject\ORMWeb\Default.aspx.designer.cs 50 46 ORMWeb

I am using following code to bind the grid programatically

 

IObjectScope scope = ObjectScopeProvider1.ObjectScope();

 

 

 

var result = from o in scope.Extent<OrmProject.User>() select o;

 

RadGrid1.DataSource = result;

RadGrid1.DataBind();
 when i build the project OrmWeb then get following error

Error 24 OpenAccess Error: Telerik.OpenAccess: Updating SQL schema failed. No persistent class could be found.
To define persistent classes use the [Persistent] attribute at the class level.
If multiple projects are used additional references must be made in the configuration file.
To update the required references use 'Update Config References' from the OpenAccess menu. ORMWeb 

i think, i have missed some steps to use orm DAL in web application
i did not analyze where i have done mistake pz help me , i m using open access ORM first time.

 



 

 

 

 

 

 





1 Answer, 1 is accepted

Sort by
0
Damyan Bogoev
Telerik team
answered on 15 Jul 2010, 05:01 PM
Hello Sudhanshu Tripathi,

1. You should add a reference to the Telerik.OpenAccess.Web assembly in order to be able to use the OpenAccessDataSource. After that you should use the following register directive within the aspx page
<%@ Register Assembly="Telerik.OpenAccess.Web" Namespace="Telerik.OpenAccess" TagPrefix="telerik" %>

2. The problem arises because the Enhancing setting for the web application project is set to true. Click on the project root and go to the Properties Window where you should set the Enhancing to false;
Hope that helps.

Best wishes,
Damyan Bogoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Getting Started
Asked by
Sudhanshu Tripathi
Top achievements
Rank 1
Answers by
Damyan Bogoev
Telerik team
Share this question
or