I'm working in a project on wich I need to save some business object to a Remote WCF server, and others to a local server. That means that I need to have two DataPortals.
How Can I do that? There is a way to create an instance of the local DataPortal with his own channel?
Thanks in advance.
You can configure CSLA to use remote dataportal and then use the [RunLocal] attribute to make force "root" data access methods use the local dataportal.
This is similar to the default handling of DataPortal_Create that has [RunLocal] attribute.
[RunLocal]
protected override void DataPortal_Update()
{
/// this update method will use LocalPortal
/// no matter if the Csla config says to use a remote portal.
}
Copyright (c) Marimer LLC