How to Include associated entities
问题 I want to create test case for below method "GetByEmail". public User GetByEmail(string email, bool includeUserRoles = false, bool includeUserType = false) { Expression<Func<User>> whereClause = u => u.Email == email; return GetQuery(whereClause, includeUserRoles, includeUserType) .FirstOrDefault(); } private IQueryable<User> GetQuery(Expression<Func<User>> whereClause, bool includeUserRoles = false, bool includeUserType = false) { IQueryable<User> query = base.GetQuery(whereClause); if