What is, does such a database exist?

What I want to do:

  • Load values ​​for the program from a file.
  • Read / add / change these values.
  • Save these values ​​back to file
  • I would like to have the database as a file
  • I want as much data as possible to remain in memory, so I do not clog the file
  • I would like to query Linq or use the standard query language
  • I want the data returned as arrays of objects

I suppose there is something like this. Sounds like GAE support, but for C # and local applications.

I am looking for names for this interaction of data and projects, preferably for free with non-infectious and crushing licenses, to help me understand and use the concept.

+3
source share
3 answers

Given your requirements, I would recommend looking at the Entity Framework . It meets almost all of your request / update requirements and works with many databases.

For a single file database that works with EF, you can consider SQL Server CE . Version 4 is currently in beta and handles your only file well, mostly in memory, etc ..

The only thing is that using LINQ with EF, you will get your objects as IQueryable<T>or IEnumerable<T>, as a rule, not as arrays. You can always call .ToArray()to convert to an array, but this is usually not required.

+1
source

, , , .

XML Linq-to-XML, - , .

, ​​ , Sqlite SQL Server Express SQL Server Compact Edition.

+1

You want an XML document that you easily access using Linq for XML.

XDocument.Load(memoryStream)

And you are on the way.

0
source

Source: https://habr.com/ru/post/1756775/


All Articles