<cite>aaron: </cite> You need to be in an UnitOfWork when you call .FirstOrDefaultAsync(). You can first try the [UnitOfWork] attribute on a public virtual function. If that does not work, you need to inject and use IUnitOfWorkManager.
Thank you for your quick respone, It worked with the [UnitOfWork] attribute :D.