Skip to content

Insane in the Main Frame

I am Ophidia, programmer.

  • Home
  • Deutsch
  • English

.Net Core

Debug Http Request

11. December 202311. December 2023 ophidiaC#

I had a Controller with a HttpDelete Route. When sending stuff via body to the route, there was a problem, „one or more validation errors occurred“. For debug purposes, you can use a LoggingMiddleware, inspired by this stackoverflow solution. In […]

Read more

EF Database Migration: Adding data and getting the ID

12. February 202112. February 2021 ophidiaC#
Photo by Christopher Burns on Unsplash

I had to add data to existing tables. Using seed data wasn’t possible, therefore I wanted to do it via database migration. If its simple data, migrationBuilder.InsertData works fine. But its not that easy when you have to add a […]

Read more

remove-migration doesn’t remove the migration files

20. March 202020. March 2020 ophidiac#
Photo by Aryan Singh on Unsplash

Using .net core and Entity Framework I encountered the problem that since introducing a seeding migration, the add-migration and remove-migration commands no longer worked as expedted. Problem 1: add-migration would try to update a table with every new migration – […]

Read more

LINQ: get the 5 people with the next upcoming birthdays

16. December 201916. December 2019 ophidiaLINQ

I needed a list of 5 students ordered by their upcoming birthdays. To make it a little harder, there is a Student table and a Person table where data such as birthday or name are stored. The query I came […]

Read more
  • Privacy
  • Contact
  • RSS
Powered by WordPress | Theme: Astrid by aThemes.