Legion Developers

Sharing Knowledge

Author : Juan Pinzon

Solving “A possible object cycle was detected”. in .NET

To solve the problem: System.Text.Json.JsonException: A possible object cycle was detected. This can either be due to a cycle or if the object depth is larger than the maximum allowed depth of 32. Consider using ReferenceHandler.Preserve on JsonSerializerOptions to support cycles. There are at least two options: Remove circular references. Ignore circular references. The easy […]

Connect Salesforce Pub/Sub API with .NET – Part II

Hi guys, this is the continuation for Connect Salesforce Pub/Sub API with .NET – Part I In this part of tutorial I am going to show you how to connect and subscribe with the salesforce pub/sub api, so, before to start I am going to list some requirements to get accomplish this task. Configure one […]

Connect Salesforce Pub/Sub API with .NET

Hi guys, I want to share how to connect Salesforce Pub/Sub API with .NET. I was recently working on an integration project where I needed to integrate C# with Salesforce’s pub/sub API, so to solve this requirement I did some research and finally managed to finish the task. What is Salesforce Pub/Sub API: Pub/Sub API […]

Execute ef-core migrations with different settings

Hi guys, now I want to share how to execute ef-core migrations with different appsettings.json files, to change the string connection to execute migrations according to the environment. Supposing that you have different string connections for each environment that you have, for example: development, staging, production; you could have three appsettings. appsettings.development.json appsettings.staging.json appsettings.production.json If […]

Consume SOAP services with HttpClient in .NET

Consume SOAP service with HttpClient in .NET doesn’t have to be hard. In recent days I need to consume some soap services in .NET 6, and I need to review some concepts about SOAP services in C#. After doing some research I found some examples using HttpWebRequest, but this class is marked as obsolete in .NET […]

How To Make an API with Azure Functions and OpenAPI Support

Hi guys, in this occasion I want to share how to create an API with azure functions to expose it as serverless functions. The current version for visual studio at writing this post is 2022, so the next pictures are from that version. The first step is create the azure function project in visual studio, […]

Scroll to top