This question is locked. New answers and comments are not allowed.
Hello
ORM I'm using Telerik Q2 2010, and update my application with the new data model DOMAIN MODEL and with the old system I could do something like this:
<
telerik:RadComboBox
ID
=
"RadComboBox1"
Runat
=
"server"
DataSourceID
=
"OpenAccessDataSourceColegios"
DataTextField
=
"NombreColegio"
DataValueField
=
"CodigoColegio"
>
</
telerik:RadComboBox
>
<
telerik:OpenAccessDataSource
ID
=
"OpenAccessDataSourceColegios"
runat
=
"server"
ObjectContextProvider
=
"Prueba.TelerikOrm.AcademicoEntityDiagrams, Prueba.TelerikOrm"
TypeName
=
"Prueba.TelerikOrm.VColegiosxUsuarios"
Where
=
"UserName == @UserName"
>
<
whereparameters
>
<
asp:Parameter
DefaultValue
=
"0"
Name
=
"UserName"
/>
</
whereparameters
>
</
telerik:OpenAccessDataSource
>
and the code behind
Protected Sub OpenAccessDataSourceColegios_Selecting(ByVal sender As Object, ByVal e As Telerik.OpenAccess.OpenAccessDataSourceSelectingEventArgs) Handles OpenAccessDataSourceColegios.Selecting
e.DataSource.WhereParameters("UserName").DefaultValue = My.User.Name.ToString()
End Sub
and now with the new scheme of data it generates the following error:
The ObjectScope has already been disposed and it's managed persistent
objects can no longer be accessed. The ObjectScope should be disposed at the end
of the life cycle of your business logic instance. This can also be done in the
Dispose of your ASP page or MVC controller.
Nombre del objeto:
'Telerik.OpenAccess.RT.EnlistableObjectScope'.
I do not understand that may be happening, if you have not read either online or aid if the new model definitely is not possible to send parameters by code.
when they relate one with a radcombobox openaccessdatasource as parameter is the same.
Thank you for your collaboration and attention
Alex Alfonso
Bogota Colombia