0

I'm creating a web shop using .NET Core and I'm storing all of the product information in a SQL database using EF Core.

As a part of this, I would like to store the x, y, and z dimension of each product. But I'm wondering about the best way of storing three values that belong together in this way in a database using EF Core.

EF Core doesn't allow me to store them as an array or list of for example floats or integers, and I want to avoid creating a dedicated model concered only with the three dimensional size values for each product.

Any suggestions?

Dedoj
  • 105
  • 1
  • 14

1 Answers1

0

Store it as a Json column (Refer this answer) and if you frequently run read queries on it then setup indexes.

jayasurya_j
  • 1,519
  • 1
  • 15
  • 22