草庐IT

java - 类 "Department"已映射,但未包含在任何持久性单元中

我收到此错误,我不知道原因:“部门”类已映射,但未包含在任何持久性单元中。我有两个项目。一种是在我的persistence.xml中,标记之间只有两行:我的类(class)是:packagebr.com.jm.user;importjava.io.Serializable;importjavax.persistence.Entity;importjavax.persistence.Column;importjavax.persistence.Id;importjavax.persistence.Table;;@Entity@Table(name="DEPARTMENT")publicc

c# - 给定 UserPrincipal 对象,如何从 Active Directory 获取 "Company"和 "Department"?

这可能吗?代码示例会很好。 最佳答案 实际上,问题是如何获取.NET3.5(System.DirectoryServices.AccountManagement.)UserPrincipal对象的两个属性,但未给定userPrincipalName。这里是如何用extensionmethod做到这一点的:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.DirectoryServices;usingSys