This question is locked. New answers and comments are not allowed.
I'm having the following problem loading the configuration file via BackendConfiguration. I recieve the error:"Invalid backend". Can anyone help me?
Config File:
<
configSections
>
<
section
name
=
"openAccessConfiguration"
type
=
"Telerik.OpenAccess.Config.OpenAccessConfigSectionHandler, Telerik.OpenAccess"
requirePermission
=
"false"
/>
</
configSections
>
<
openAccessConfiguration
xmlns
=
"http://www.telerik.com/OpenAcessConfiguration"
>
<
backendConfiguration
name
=
"CreditosPreaprobadosConfiguration"
connectionTimeout
=
"134"
/>
</
openAccessConfiguration
>
Context Class:
using
System;
using
System.Linq;
using
Telerik.OpenAccess;
using
Telerik.OpenAccess.Metadata;
public
partial
class
CreditosPreaprobadosContext : OpenAccessContext
{
private
static
MetadataContainer metadataContainer =
new
CreditosPreaprobadosMetadataSource().GetModel();
private
static
BackendConfiguration backendConfiguration = GetBackendConfiguration();
public
CreditosPreaprobadosContext(
string
dbConnection) :
base
(dbConnection, backendConfiguration, metadataContainer)
{
}
public
IQueryable<TipoCanales> TipoCanales
{
get
{
return
this
.GetAll<TipoCanales>();
}
}
/// <summary>
/// Devuelve un objeto <see cref="BackendConfiguration"/>
/// </summary>
/// <returns></returns>
public
static
BackendConfiguration GetBackendConfiguration()
{
BackendConfiguration backendConfiguration =
new
BackendConfiguration()
{
Backend =
"CreditosPreaprobadosContext"
};
BackendConfiguration.MergeBackendConfigurationFromConfigFile(backendConfiguration, ConfigurationMergeMode.ConfigFileDefinitionWins,
"CreditosPreaprobadosConfiguration"
);
return
backendConfiguration;
}
}