Hi @Sunil A M , Welcome to Microsoft Q&A.
SQLite supports the following data types:
- NULL: Indicates that the value is NULL.
- INTEGER: Represents an integer, which can store an integer of 1, 2, 3, 4, 6 or 8 bytes.
- REAL: Indicates floating-point numbers, which can store 8-byte IEEE floating-point numbers.
- TEXT: Indicates a text string, which is stored using encoding.
- BLOB: Represents binary data, which can store any type of data, such as images, audio, video, etc.
- NUMERIC: An exact numeric type that can store numeric values of arbitrary precision.
So if you want to use Entity Framework Core to save Dictionary<string, object>
to SQLite database, you need to create your own entity class to represent the dictionary structure.
The following is my example, and after testing the migration is successful, I changed the object to a specific class:
public class DictionaryEntity
{
public int Id { get; set; }
public string Key { get; set; }
public Add Value { get; set; }
}
public class Add
{
public int Id { get; set; }
}
Best Regards,
Wenbin
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.