Just Simply Code

Another developer blog

  • Home
  • About
  • Register
  • Policy

Year: 2021

Custom JSON converter to de-serialise Enum description value to Enum value

1 August 2021 / Leave a Comment

It’s common to have description attributes on Enum types. This allows adding a longer description string for each Enum value. In one of my recent projects, I have a Web API that needs to accept this description value from the JSON request body and map to the correct Enum value. In this post, I’m going … [Read more…]

Posted in: Uncategorised Tagged: Enum, Json, Json Converter, Json Deserialisation, Json Serialisation

Revisit – EF Core error when updating nested list of an object

18 July 2021 / Leave a Comment

In this previous post, I talked about how EF uses Update statements instead of Insert when adding new items with the item key populated to a list property of an object and then SaveChanges. In that post, the solution to get it working was to not populate the key property when adding the item to the list. EF … [Read more…]

Posted in: Uncategorised Tagged: EF Core

Specflow and Selenium solution template

6 June 2021 / Leave a Comment

I recently worked on building an automation testing framework for our testers to use. I decided to turn the framework into a generic solution that can be used to automate any website or API. In this post, I’m going to explain how the solution is structured, how it works and some of the concepts in … [Read more…]

Posted in: Uncategorised Tagged: BDD, Selenium, Specflow, Test Automation

Using raw SQL with Entity Framework

23 May 2021 / Leave a Comment

When using Entity Framework, most people use LINQ-to-Entities to query the database. LINQ-to-Entities is easier and nicer to use than raw SQL. However, there are times you might want to use raw SQL instead, such as using an existing stored procedure, control the generated SQL for complex queries (LINQ-to-Entities can be very slow for complex … [Read more…]

Posted in: Uncategorised Tagged: EF Core, SQL

Updating nested object value in DynamoDB

9 May 2021 / Leave a Comment

In my recent project, I needed to update a single value in a nested object for a document on DynamoDB. In other projects, I would update the nested object property and then Save the whole document using SaveAsync from IDynamoDBContext. However, in this project, it needs to update the document from another microservice and I … [Read more…]

Posted in: Uncategorised Tagged: DynamoDb, Update

Getting query value from URL

25 April 2021 / Leave a Comment

In this short post, I’m going to show how to get query value URL by key. Let’s say we have a sample URL like this. https://www.justsimplycode.com/fake/url?queryA=123&queryB=ABC There is this method ParseQueryString from HttpUtility, which can be imported from System.Web, that parses URL to a name value collection. This is the result One thing to watch … [Read more…]

Posted in: Uncategorised Tagged: HttpUtility, URI

EF Core error when updating nested list of an object

11 April 2021 / Leave a Comment

The problem In one of our projects that uses EF Core, we have a one-to-many relationship model like this We need to build a new endpoint which allows users to update the blog as well as all its posts. When I review the pull request from my team member, the way he builds it is … [Read more…]

Posted in: Uncategorised Tagged: EF Core, EF Core 3.1, EF Core 5.0

Converting HTML to PDF using wkhtmltopdf with UTF-8 encoding

28 March 2021 / Leave a Comment

One of the micro services we have at work is responsible for converting HTML to PDF. We use wkhtmltopdf to convert HTML to PDF. In my opinion, it is not the nicest tool to use but it is open source and free. In this post, I will show how we use it. Firstly, we need … [Read more…]

Posted in: Uncategorised Tagged: html, PDF, UTF-8, wkhtmltopdf

Get local date time with date time offset from UTC using Noda Time

14 March 2021 / Leave a Comment

In this previous post, I showed how to get Australian timezone name by state using Noda Time from UTC. In one of my recent tasks, I need to get the current date at 5pm local time to the user from an UTC date time in the format “yyyy-MM-ddTHH:mm:ss.fffK”. The user timezone is important here. The … [Read more…]

Posted in: Uncategorised Tagged: Noda Time

Find certificate from Firefox certificate manager

28 February 2021 / Leave a Comment

In one of the projects at work, I need to find certificate matching an email address from Firefox certificate manager if there is no matching certificate found in the Windows certificate store. In this post, I’m going to show how to find a certificate and export it from Firefox certificate manager. Firstly, let’s create a … [Read more…]

Posted in: Uncategorised Tagged: Certificate, Firefox
« Previous 1 2 3 Next »

Search Posts

Recent Posts

  • Override IHttpRequestBodyDetectionFeature.CanHaveBodyOverride value in .NET Core Web API
  • Allow empty request body in PUT and POST HTTP requests in .NET Core Web API
  • Modify request body with middleware in .NET Core Web API
  • Running MS Orleans on AWS ECS
  • Respect leading and trailing spaces when querying SQL Server
Support my blog here!Support my blog!

Archives

  • July 2024
  • June 2024
  • July 2023
  • April 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • October 2017
  • September 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • July 2016
  • June 2016
  • March 2016
  • February 2016
  • January 2016

Copyright © 2026 Just Simply Code.

Me WordPress Theme by themehall.com