Moved the lifetime management from the dbcontext to the unit of work