HandleError(View = "AddItemError",ExceptionType=typeof(CreateItemException))]
public class PersistenceController:Controller
{
private readonly IPersistenceManager _persistenceManager;
public PersistenceController(IPersistenceManager persistenceManager)
{
_persistenceManager = persistenceManager;
}
public PersistenceController():this(PersistenceFactory.CreateInstance())
{
}
The PersistenceFactory was introduced to decouple the concrete types created from the actual client using the type.
No comments:
Post a Comment