Authentication Broker framework compatible with most IAM service

I am looking for a generic Authentication Broker framework in java using spring framework that can integrate my application with any IAM authentication/authorization service like LDAP, RADIUS, SAML etc? My objective is to create an adapter for software that enrolls organization that brings in their own Single Sign-On Implementation.

How to doCRUD Operations using React and PnP-JS Core on sharepoint lists with SharePoint FrameWork (SharePoint 2016)

I would like to create a webpart(Form) where user can feed the input and those data i have to save it in sharepoint list.

I want to perform CRUD operation using React Framework with pnp.js in SharePoint 2016 onprem.

SPFx React framework pnp.js SharePoint list

Do you have any simple examples I can look at and test on SharePoint 2016 to help me to get familiarized with this new concept.

I have searched in github but i couldnt find the right solution. Please help me.

Entity Framework 6 startup performance in SaaS environment/scenario

We use EF6.2 in our Web SaaS application. We have database per account architecture which means every customer gets separate SQL Server database.

What we see is extremely slow startups. We also see startups getting proportionaly slower with amount of accounts we add.

We currently do not use any of optimizations possible. We don’t do ngen, we don’t “pre-compile” views. But what bothers me is that it’s not performance hit we take overall, but per account.

That leads me to beleive it is related to metadata cache which according to article here being built in-memory and tagged with hash derived from connection string.

Looking for any suggestions on how to reduce “warm up” time to single occurence

SharePoint framework and typescript promises

I need some help regarding Typescript. I was following a tutorial which pulls search data in client side web part. The code for the service is as follows (it works):

const _results:SearchService.ISearchResult[] = [];     return new Promise<SearchService.ISearchResult[]>((resolve,reject) =>       { pnp.sp.search({     Querytext: query,     RowLimit: 5,     StartRow:0  }).then((results) => {      results.PrimarySearchResults.forEach((result) => {         _results.push({             title: result.Title,             description: result.HitHighlightedSummary,             link: result.Path,             author: result.Author         });     }); }).then(() => {     resolve(_results); }).catch((err) => {     reject(new Error(err)); });   });      } 

In an attempt to learn and explore more, I came across the await syntax to work with promises which avoids the use of then. I rewrote the above as follows (this also works):

 const _results:SearchService.ISearchResult[] = []; const searchResponse: Promise<SearchService.ISearchResult>[] = [];  const pnpResponse: any = await  pnp.sp.search({ Querytext: query, RowLimit: 5, StartRow: 0   });     for (let searchResponses of pnpResponse.PrimarySearchResults) {      _results.push({             title: searchResponses.Title,             description: searchResponses.HitHighlightedSummary,             link: searchResponses.Path,             author: searchResponses.Author         });          }          return _results; 

Then in my webpart.ts file (render method): I do this (this also works)

      const _search: SearchService.ISearchService = new SharePointSearchService.SharePointSearchService();        let resultsHtml: string = "";     let searchResults = await _search.GetSearchResults(query); for (let result of searchResults) {         resultsHtml += `<div class="ms-ListItem ms-Grid-col ms-u-sm8">                             <a href="$  {result.link}"><span class="ms-ListItem-primaryText" >$  {result.title}</span></a>                              <span class="ms-ListItem-secondaryText">$  {result.author}<span>                             <span class="ms-ListItem-tertiaryText">$  {result.description}</span>                             <span class="ms-ListItem-metaText">10:15a</span>                              <div class="ms-ListItem-actions">                                  <div class="ms-ListItem-action" targerUrl="$  {result.link}"><i class="ms-Icon ms-Icon--OpenInNewWindow">                                  </i></div>                                </div>                           </div>`;  

}

My question is: is my understanding of the await correct as how I have it implemented? The function works as expected – however, is it the correct way that I have it implemented or have I missed some critical point in there – perhaps misunderstood how it works (and the function just happens to work although it is implemented incorrectly in principle?)

I thank you all for your input and help. This will really help me learn more.

Thanks.

cargar combobox seleccionado desde sql server utilizando entity framework

tengo una tabla trabajador que guarda los registros relacionados con trabajador como rut-nombre-sexo-estado civil.

sexo y estado civil se guarda como 1=masculino- 2=femenino

esto lo realizo a traves de un combobox.

lo que necesito realizar es que al realizar una búsqueda del trabajador me cargue el combobox seleccionado automáticamente.

mi código para cargar el combobox es el siguiente

public void llenasexo()     {                   var sexo = db.TB_Sexo.ToList();                 if (sexo.Count > 0)                 {                     combo_sexo.DataSource = sexo;                     combo_sexo.DisplayMember = "DescripcionSexo";                     combo_sexo.ValueMember = "Idsexo";                     if (combo_sexo.Items.Count > 1)                     {                         combo_sexo.SelectedIndex = -1;                     }              }       } 

y mi codigo para extraer los datos es:

 TB_Trabajador trabajador = (from q in db.TB_Trabajador where q.Rut == txt_rut1.Text select q).First();         trabajador.Rut = lbl_rut.Text;         trabajador.Nombres = txt_nombre.Text;         trabajador.Sexo = combo_sexo.ValueMember("idsexo"); 

el error esta al tratar de cargar el valor seleccionado al combobox sexo donde muestra que valuemember no es invocable.

Updating sub-properties via Entity Framework

I was wondering how to updated nested objects/sub-properties when using Entity Framework. But to make things clear, let’s start with an example.

I have an object, which can own a number of other objects. In other words, an object which contains a list of a different type of objects. This could be a person, who has multiple cars.

public PersonModel Person() {     public List<CarModel> Cars { get; set; } } 

Now I want to make a service with a method called AddCar(), but I am a bit puzzled on what goes inside this method. It could look something like this:

public void AddCar(PersonModel owner, CarModel car) {     car.OwnerId = owner.Id;     var ctx = GetDbContext();     ctx.Cars.Add(car);     ctx.SaveChanges(); } 

Obviously this is a bit simplified, but you get the point. The problem in the example above is that the owner does not get updated. The new car will not be added to List<CarModel> Cars, until the person is re-loaded from the database.

This must be a common issue, so I suppose there is some sort of standard way of dealing with this. I just have not been able to find it. Here are the different solutions I can think of:

  • Make a method for updating the person from the database, which is called inside AddCar() (after adding the car).
  • Alter the object owner by adding the car to the list of cars, on top of adding it to the database (also inside AddCar()).
  • Add the new car to the list of cars inside owner and then make an update function which handles updating the owner, and all of its nested objects.

I cannot see any clear winnder in the suggestions above. Maybe it’s something completely different? Any advice would be much appreciated.

Setting up environment variable for checker framework

I want to use checker framework for java and I am setting environment variable for it but when I am checking version of it in PowerShell in windows. It is showing that it is not able to access checker framework.

java -Xbootclasspath/p:%CHECKERS%/binary/jsr308-all.jar -jar %CHECKERS%/binary/jsr308-all.jar -version 

Here is the error

Error: Unable to access jarfile %CHECKERS%/binary/jsr308-all.jar

I have unzipped the downloaded file in C drive. And for the environment variable here is the paths that i have tried.

  • 1

C:\checker-framework-2.7.0\checker-framework-2.7.0\checker\di

  • 2

C:\checker-framework\checkers

  • 3

C:\checker-framework-2.7.0\checker-framework-2.7.0\checker

  • 4

C:\checker-framework-2.7.0\checker-framework-2.7.0