Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
In my .net/c# application on windows desktop i need to locally store some statistics about the users behaviour.
This data should be read again the next time the application is running.
To simply explain the kind of data: it is basically key-value pairs.
I could use something like sqlite but i can imagine there is already something for this premade in .NET?
It comes down to what you want to store - for simple data objects you may use XmlSerialization that can be stored into IsolatedStorage area, specific to appdomain, or userlevel.
for more details: http://msdn.microsoft.com/en-us/library/cc221360%28v=vs.95%29.aspx
If it is relational then Sqlite is your option as well.
So the million dollar question is - what are you planning to store?
You can serialize the state using a binary file or even JSON
Not sure, what you want to achieve. Just keep the data? Or somehow access/process it? What you do with your data determines the data structure.
Among the others, you could put the items to array or List and access them with LINQ. Or you could use ADO.NET DataSet/DataTable, even without database behind it.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Am having trouble googling for this type of product which am sure is out there so wondering if someone can point me in the right direction.
Is there a s/w tool that can import C# source code files into a SQL database and which then has a front end that allows a user to easily search for various things from that imported data - i.e: method names, types, etc
It would be a nice pet project to do in my own time but our team are looking for something out of the box and slick that is out there already - anyone know of any products?
Thanks
You wouldn't use SQL Server (or any RDBMS for that matter) for this because source-code files are not an example of relational data.
Instead you would run each source file through a parser and extract symbol names (e.g. type names, member/field/variable names, etc) then index them using a system like Lucene.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I wrote an app in C# which allows user to select a directory and does some simple things on the files in the directory. Now I want to add a ListBox to it that saves the most recent 5 selected directories. I don't want to hook up my app to a db because it's a very simple app. I can save the values to a txt file but I don't think that's the best practice. Is there any built-in features in Visual Studio Windows Form Application which allows me to do that? (I tried *.resx file and it doesn't seems to work for such purpose.)
The use of Settings can do this feature. It is so sample just go to the project properties and add a new propertie with type StringCollection .
You can manipulate this propertie like a sample collection by add ‚remove paths.
Take a look in this tutorial : http://blog.csharphelper.com/2011/08/18/use-a-setting-that-contains-a-string-collection-in-c.aspx
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
For my very basic application, I am planning to design/use json-file based structure.
Simply, application is very similar to a rss reader. So data security is not a big concern.
There will be categories like news, sports, tech and media. I am planning to save information/objects under files like
media-todaysdate.json, so I can iterate through files by using date stamp.
Since files will be separated by dates I would not expect huge file sizes to create memory problem.
My question is that is there any framework that will help me to CRUD json files?
Or is there any easier way to manage information like mine?
You may want to take a look at Rob Conery's Biggy project.
https://www.infoq.com/news/2014/03/Biggy-Intro
It's a file-based store for JSON.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
We're going to start writing C# programs against a old legacy database from the early 1980s. There is no support for SQL or relationships, and communication with it is through Telnet commands.
I'm thinking of using some sort of ORM framework, or write my own. My question is if there is any good framework that is possible to easily adapt to these special conditions?
I want to be able to map the classes in my program against tables in the database and work with the database in a modern way, without having to think about the complex telnet commands and the translation of the returned information into something meaningful.
I find it hard to believe that such datasources have any usable adapters today. Think of what kind of operations you will need and construct an ORM with any commands you may require. Depending on structure and data this may vary in a lot of different ways. Some questions you may take along in this project are
Can we standardize CRUD operations or do we have to build a DTO api
Shall we be able to handle any binary data
What pattern shall we use in our C# code and will C# suffice
When it comes to DTO-Api's I like to implement CQRS (Command Query Responsibility Segregation, read this http://msdn.microsoft.com/en-us/library/jj591573.aspx). If you are constructing an ordinary CRUD-Api you will most likely have to separate your code differently and resolve each command type dynamically (if possible).
Feel free to e-mail me, you should be able to reach me in the corp-ad.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
This post was edited and submitted for review 8 months ago and failed to reopen the post:
Original close reason(s) were not resolved
Improve this question
Is there a method to use an XML file instead of a database in the Entity Framework?
Entity Framework itself is provider-based, and is designed to operate over a relational database. If you really wanted to, you could write your own provider for EF that reads from/writes to an xml file, but it would be a huge amount of work.
I expect you should really be looking at one of:
LINQ-to-XML
XML (de)serialization
XPath/XQuery
XSLT
Entity Framework doesn't have a natural fit in this scenario.
Linq to XML isn't all that much actually. I'd go with a serializable solution instead.
I like LINQ to XSD: http://linqtoxsd.codeplex.com/
It is basically LINQ to XML with some classes derived from the XSD to ensure it fits the schema...
I don't think that's really possible.
From MSDN (emphasis mine):
The ADO.NET Entity Framework is designed to enable developers to create data access applications by programming against a conceptual application model instead of programming directly against a relational storage schema.
You can use an oledb connection together with a FORXML command... but you will not have all functionality that is available with other providers...
Is the problem that you need a file-based data store? If so, you could use a SimpleDB data provider. SimpleDB is great if you need a relational database in a single file. MS Access is great for this as well.
XML is designed for communication. If used for storage, it is incredibly inefficient. It might be best to break the two tasks apart and store your data in a relational database and then generate your XML from your data.