Question

I need to store some simple data (just some POCO objects with a few attributes, nothing fancy).

public class MyPOCO
{
    public int Id {get; set;}
    public string Title {get; set;}
    public string Email {get; set;}
    // ...
}

Basically, at some point of my web application I need to check if the MyPOCO object is already persisted (matching by Id), and if it's not, persist it. That's all I need.

It can't be any database, so probably XML or JSON. What's an easy way (or Nuget package) to store it?

Was it helpful?

Solution

I suggest to use a in-process database like SQL Server CE or SQLite together with an O/R mapper. This is easier and more maintainable than reinventing a small database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top