当我在Entity Framework设计器表面上创建实体并定义标量属性时,从designer.cs文件中显示消息“此成员已定义多次”,然后编译器为“Id”,“FirstName”添加下划线,“标题”等。有人可以帮助我。下面是designer.cs代码的一部分。
public static Employee CreateEmployee(global::System.Int32 id, global::System.String firstName, global::System.String title, global::System.DateTime dateOfBirth, global::System.String userName, global::System.String password)
{
Employee employee = new Employee();
employee.Id = id;
employee.FirstName = firstName;
employee.Title = title;
employee.DateOfBirth = dateOfBirth;
employee.UserName = userName;
employee.Password = password;
return employee;
}