Asynchronuous Processing
This post tries to clarify the concept of asynchronuous processing. Nothing new, but quite complex. Also discusses the way to execute multiple tasks asynchronuously and a short explanation of Parallel.ForEach.
Microsoft Azure
This post tries to clarify the concept of asynchronuous processing. Nothing new, but quite complex. Also discusses the way to execute multiple tasks asynchronuously and a short explanation of Parallel.ForEach.
I have already written a few posts on AFAS Online. Below you will find a query example. I also like to share a very helpful link, which explains for example how you can apply filtering on multiple fields and with different query operations. Also note you will always have to include take, otherwise no results…
I came across an interesting NuGet package named CsvHelper. CsvHelper basically let’s you create a Csv file from a typed list. You can choose whether or not to include a header automatically. As an example, let’s say you access AFAS to get a list of users. private static async Task<List<ASB_Totara_User>> GetAfasUserAsync(Logging logging) { string take…
Sometimes you find yourself struggling with a datetime issue. This time I simply used DateTime.ToUniversalTime() at first, but that didn’t work for me. So, I decided to specifically include the time zone. I am in Amsterdam, so I tried to use the official Central European Summer Time (CEST) zone. Bad luck again. In C# you…
Asynchronuous processing is a feature you might not use that often. Below link explains the concept: Link: Asynchronuous Programming. I needed the asynchronous call in an Azure function. More specifically I had to trigger a logic app for four different regions. I found however that if one of the regions failed, the processing of the…
Generated service contract and data contracts from a WSDL using svcutil. Next, I tried to deserialize a XML message into the generated object. I received the following error: There is an error in XML document (1,2). After debugging code, I found out the [XmlRoot] attribute was not generated. Below, you see the generated datacontract with…
I had an issue when accessing a view via Entity Framework. After some research I found a blog that exactly described my issue: In the example there’s a view that returns the following data when called from SQL Server: Country Year TotalSales Philippines 2010 20.000000 Philippines 2011 40.000000 Now, let’s look at the generated class…
In a previous post we saw that it is recommended to use navigation properties in Linq to SQL. But, what if you don’t have navigation properties and still want to join two tables? The answer is in the question: use the join operator. Below is the query that I built. Note that I want to return…
I wanted to call an ExceptionHandler in a helper class. The ExceptionHandler uses Entity Framework to store the error. Then I tried to call the ExceptionHandler from a Logic App. The Logic App selects data, but does so via ADO.Net and not via the Entity Framework. The first error I received is that the EF…
Another error you can recieve from the Entity Framework is the following: The entity or complex type <complex type> cannot be constructed in a LINQ to Entities query Here is the query that I used and didn’t work: List<ProcessDefinition> entries = (from PD in contextCommon.ProcessDefinitions where PD.Process.SourceSystem == sourceSystem && PD.Process.MessageType == messageType && PD.Process.ResolveProcess…