Home About

All posts tagged with "MSSQL"

A collection of 8 posts tagged with "MSSQL"

Page 1 of 1

Entity framework - How to add static data using data seeding

I am not sure that the correct term is "static" data - it seems to be known as seeding, which is the term I »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Entity Framework, C#, .Net, MSSQL 10 April 2022

Entity framework - How to set the connection string of the DbContext

It seems that every guide I find on Entity framework, the database connectionString is fetched from the config file magically. I wanted to inject it instead »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Entity Framework, MSSQL, Dependency injection 09 April 2022

Entity framework - Unable to create an object of type <type>. For the different patterns supported at design time see <link>

Today I was trying to make an initial migration using Entity framework. I encountered an error when calling dotnet ef migrations add InitialCreate: C:\Users\peter\ »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Entity Framework, C#, MSSQL 05 April 2022

MSSQL - A network-related or instance-specific error occurred

I have witnessed this error quite a few times in my career. I see it every time there is something wrong with the network in a »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on MSSQL, .Net 20 February 2022

MSSQL - How to select JSON values from a column and parse them to decimals or integers using JSON_VALUE

In this post I show how to select and cast values from a column containing JSON so that you can work with the fields as you »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on MSSQL, SQL, JSON 06 March 2021

MSSQL - How to force mssql to use a specific index for a query using an index hint

It is quite easy to give SQL a hint on which index to use for a query. I will however, start by warning you: this is »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on MSSQL 15 August 2020

MSSQL - Adding a column to a table without a default value or allowing null

If you are on this page you likely got an error similar to the following: Msg 4901, Level 16, State 1, Line 8 ALTER TABLE only »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on MSSQL 08 August 2020

MSSQL/Dapper - Select statement slow on VARCHAR column with index

I recently had an odd experience with a select statement. It was a very simple select statement hitting a unique index on a varchar column. But »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on Dapper, MSSQL, Encoding 21 June 2017
Page 1 of 1
Rss
Twitter
LinkedIn
profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2022 Cookie policy