This question is locked. New answers and comments are not allowed.
Hi , I want to manually defin
My question , If I define context as a generic OpenAcessContext , how I reach to entites.
is the same with Scope.Extent<Systems>()
Or is there any advice of you for usage of several context in one point. In old scope model this is easy with Extend method.
Thanks.
e
OpenAccessContext like this.
string connectionString = @"data source=192.168.5.217;initial catalog=xxx;user id=sa;password=xxx";
XmlMetadataSource metadataSource =
XmlMetadataSource.FromAssemblyResource(
Assembly.LoadFrom("BIS.Business.MainApplication.dll"),
"BisFrameworkEntityDiagram.rlinq");
BackendConfiguration configuration = new BackendConfiguration();
configuration.Backend = "mssql";
OpenAccessContext context = new OpenAccessContext(
connectionString, configuration, metadataSource);
My question , If I define context as a generic OpenAcessContext , how I reach to entites.
public void GetSystem(OpenAccessContext context)
{
return context.GetAll<
Systems
>().FirstOrDefault ............
}
.
FirstOrDefault
........................
GetAll
() method really gets all values?Or is there any advice of you for usage of several context in one point. In old scope model this is easy with Extend method.
Thanks.