如题,对表中UserGuid, Type, Permission三个字段作为主键
modelBuilder.Entity<UserPermissionInfo>() .HasKey(up => new {up.UserGuid, up.Type, up.Permission});
就这样,多简单。
学习了