How to manage squidex content clients

Hi, I’m just curious what is the best why how to handle multiple content clients for Squidex?

Is this still the option?
var client = clientManager.GetClient<Model, ModelData>(“models”)
and what is the scope of client in manager, is it every time recreated or it’s implementing some client factory pattern?

It depends on the version of the Squidex.ClientLibrary you are using as it changed a bit in v15: .NET - Squidex

In summary
var blog1 = client.CreateContentsClient<BlogPost, BlogPostData>("blog1");
became
var blog1 = client.Contents<BlogPost, BlogPostData>("blog1");

And more importantly those clients are now internally cached.

1 Like

Thanks a lot, great! This looks awesome.

And how should we properly manage multiple client per application? When we have multi-app squidex and one .net service handling it.
Is there any way to get client by appname or clientId?
Or we need to mantaint them manualy?

Yep multiple apps in single application is pretty simple in v15+ of the Squidex.ClientLibrary: