This question is locked. New answers and comments are not allowed.
Hi I'm just playing with SP and external content types. I've written a model in vs 2010 and implemented the GetList, GetItems and update. I'm aggregating different objects (done with the orm wizz) into one single customer (of which i render in a list in SP).
However the following row gives me an error ' not implemented on server ('ToCustomer(empl)')':
using (var ctx = new AdventureWorksEntityDiagrams(@"data source=MTO\SOLO;initial catalog=AdventureWorks;integrated security=True"))
{
return (from empl in ctx.Employees select ToCustomer(empl)).ToArray(); <- not implemented on server ('ToCustomer(empl)')...
}
however this works:
var list = new List<Customer>();
// ReSharper disable LoopCanBeConvertedToQuery
foreach (var employee in ctx.Employees)
{
list.Add(ToCustomer(employee));
}
// ReSharper restore LoopCanBeConvertedToQuery
return list;
The ToCustomer is a private static method within the class (never tried to make it public)... it that the issiue?
Another question (I'm a newbie on this) - the app.config is bypassed by the connection string (explicitly in the c'tor) since i do not want to update the sites web.config (shall I add a web.config somewhere in the wsp deployment with the connection string?). Or how should this be done?
Cheers,
Mario
However the following row gives me an error ' not implemented on server ('ToCustomer(empl)')':
using (var ctx = new AdventureWorksEntityDiagrams(@"data source=MTO\SOLO;initial catalog=AdventureWorks;integrated security=True"))
{
return (from empl in ctx.Employees select ToCustomer(empl)).ToArray(); <- not implemented on server ('ToCustomer(empl)')...
}
however this works:
var list = new List<Customer>();
// ReSharper disable LoopCanBeConvertedToQuery
foreach (var employee in ctx.Employees)
{
list.Add(ToCustomer(employee));
}
// ReSharper restore LoopCanBeConvertedToQuery
return list;
The ToCustomer is a private static method within the class (never tried to make it public)... it that the issiue?
Another question (I'm a newbie on this) - the app.config is bypassed by the connection string (explicitly in the c'tor) since i do not want to update the sites web.config (shall I add a web.config somewhere in the wsp deployment with the connection string?). Or how should this be done?
Cheers,
Mario