This forum is not used anymore. Please ask new questions to Stack Overflow: https://stackoverflow.com/questions/tag ... ort=newest (use aspnetboilerplate tag).
By epgeroy
#9278 I have a IDomainService implementation like this:

INTERFACE
Code: Select allpublic interface IAuthorizationManager : IDomainService
    {
        Task<List<AuthorizationRole>> GetAutorizationRolesByRequisitionConsumptionCenterStore(
            RequisitionConsumptionCenterStore requisitionConsumptionCenterStore, Status status);


IMPLEMENTATION
Code: Select allpublic class AuthorizationManager : DomainService, IAuthorizationManager


METHOD DECLARATION
Code: Select allpublic async Task<List<AuthorizationRole>> GetAutorizationRolesByRequisitionConsumptionCenterStore(
            RequisitionConsumptionCenterStore requisitionConsumptionCenterStore, Status


On the other hand, I have an Event handler
Code: Select allpublic class RequisitionConsumptionCenterStoreNotifier :
        IEventHandler<EntityCreatedEventData<RequisitionConsumptionCenterStoreStatus>>, ITransientDependency


Every time the the event (RequisitionConsumptionCenterStoreNotifier.NotifyOnRelease) is fired i got an "the operation cannot be completed because the DbContext has been disposed". I already tried marking the manager method as UnitOfWork, Marking the Handler method as UnitOfWork, managing unit of work manually with
Code: Select all"using (var uow = _unitOfWorkManager.Begin())"
and declaring manager method as virtual.

I really do not know what to do, I think that is an unit of work problem. Im open to any suggestions.
Thanks in advance.