public static PermissionRole CreateNew(int depth = 0) { rt.core.model.core.PermissionRole entity = new rt.core.model.core.PermissionRole(); // You may need to maually enter this key if there is a constraint violation. entity.Id = System.Guid.NewGuid(); entity.FakeField = 88; using (rt.core.business.manager.IPermissionManager permissionManager = ObjectFactory.GetInstance <IPermissionManager>()) { entity.Permission = null; } using (rt.core.business.manager.IRoleManager roleManager = ObjectFactory.GetInstance <IRoleManager>()) { entity.Role = null; } return(entity); }