문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top