internal async Task <AppRole> Add(App app, AppRoleName name) { var record = new AppRoleRecord { AppID = app.ID.Value, Name = name.Value }; await factory.DB.Roles.Create(record); return(factory.Role(record)); }
internal AppRole Role(AppRoleRecord record) => new AppRole(this, record);
internal AppRole(AppFactory factory, AppRoleRecord record) { this.factory = factory; this.record = record ?? new AppRoleRecord(); ID = new EntityID(this.record.ID); }