storing data and access it [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
What is the best way to store data & fastest way to access it, that is free and doesn't require additional stuff to install ?

Use sqlite.

XML. Look here. Keep in mind that by using XML, you have a machine-structured human-readable file.
Update
Since this apparently looks very new to OP, here are some links:
About XML:
XML Very Basics
About Accessing XML from C#.NET
Microsoft Linq TO XML Doc/Howto
A nice Linq to XML Tutorial

Well if the language is C, you could use structs and fread() & fwrite() to save the data into single "database" file. It is not the most compatible way but it certainly is fast. And it doesn't require any additional stuff to be installed.

StreamReader to read files
http://msdn.microsoft.com/en-us/library/system.io.streamreader.aspx
and
StreamWriter to write files
http://msdn.microsoft.com/en-us/library/system.io.streamwriter.aspx
They are both classes included in the .NET framework.

I would suggest SQL Server Compact Edition - it's free, file based, requires no extra installation and this also gives you a nice upgrade path since it also supports Entity Framework.

If you need a relational database, use the System.Data.Sqlite ADO.Net wrapper around the Sqlite database. Drop the DLL into your project and you get a free, fast, single-file SQL database.
If all you need is a key-value store, then use Persistent Dictionary in the ESENT managed interface.

Related

Is there a standalone tool to generate Entity Framework code first entities from an existing database? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I want the ability to generate POCO entities outside of Visual Studio. Is this possible?
I haven't found a standalone tool (outside of Visual Studio), but I've used the Visual Studio extension EntityFramework Reverse POCO Generator on a previous project when switching from Database First / Model First to Code First.
Why does it need to be a standalone tool? You could remove the extension after the conversion if it's a permanent switch.
EntityDeveloper by DevArt. Nice with UI and strong on updating the model, too. Sadly not free, but then not exactly expensive either.
I realize this is an old question, but it's an issue I'm facing myself currently.
I've managed to have some luck by using EdmGen.exe which is included with in .net4 framework installations, so it's most probably present on client machines.
EdmGen will generate Model and Mapping files and, in addition, you can Generate Object-Layer code with it.
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\edmgen.exe" /mode:fullgeneration /c:"Data Source=<DATASOURCE>; Initial Catalog=<CATALOG>; Integrated Security=SSPI" /project:<PROJECT> /entitycontainer:<ENTITY CONTAINER> /namespace:<NAMESPACE> /language:CSharp
After this you can go ahead a generate your Object-Layer code:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\edmgen.exe" /mode:EntityClassGeneration /incsdl:.\<PROJECT>.csdl /outobjectlayer:.\<PROJECT>.Objects.cs /language:CSharp
Obviously, you'll want to replace the <*> with your particular needs.
You can also replace \Framework\ with \Framework64\ in the path if you're on a 64-bit machine.
You can read up on all of the features here:
EDM Generator Docs
I've managed to get it working, but the performance has been deplorable. I'm working with a somewhat complex database with about 80 tables and 30-40 views and the fullgeneration took over an hour. I've seen other similar cases online, but haven't found a solution.
EDIT: I just ran into this excellent tutorial/article which helps automate the whole process. Hope this helps!

LINQ Source Code Available [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm using a .Net 2 project and am missing LINQ.
I cannot use 3rd party tools or try using the System.Core hack to get it to work so I was thinking that if the LINQ source code is available I could just copy the extension methods and create a class in my project.
I mainly need it for Array, List type querying etc
Thanks
You can use mono's LINQ source code. It is highly compatible with .NET's LINQ.
Update: Even better, original .NET source now is available.
The Microsoft implementation of LINQ source is not available for you to use. LINQ will not work with .NET 2.0. You will need at least .NET 3.5.
You might want to try LINQBridge.
LINQ is not merely classes, it is upgraded compiler as well to understand Anonymous classes, methods, lambda expressions etc. You can use LINQ in 2.0 as well. Create seperate project, set framework 3.5. And it will work in 2.0 projects. Only thing u will miss is intellisense in VS 2005.
Old Question, but interesting.
Source code of linq (part of .Net framework) is now available
Reference Source
Also, in github
github-Microsoft NET Reference Source

SQL Parsing in C#? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
in my application , i have a textbox where user can paste Sql (mainly from MS-ACCESS) , i need to parse this SQL and get the table names , joins , Columns etc.
is there a easy in c# rather than using string manupulation to do this activity?
i can think of implementing a BST aslo but don't have any clue where to start?
Irony for C# has an LALR parser with several grammars already created, including one for SQL (as you can see from the screenshot on the home page). It's a very easy to use parser using operator overloads to define the grammars in a way reminiscent to BNF.
I'd suggest ANTLR using SQL Server 2000 grammar as a template.
I've done some work using the gold parser to be able to parse and programatically explore SQL statements. In my case it is SQL 89 which would not include a fair amount of access syntax but may be someone you could build on.
http://www.codeproject.com/KB/linq/QueryAnything.aspx
It's still somewhat experimental but the underlying parsing is pretty flexible.
I have had some success using this: https://github.com/jehugaleahsa/SQLGeneration
It's free to use, is open source, worth checking out.

Looking for a .NET Configuration Framework [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
Due to my next project (much SOA stuff) I need a component based configuration and stored in a database to enable a central administration. app.config/web.config does not support any of those requirements (I know some hacks with app-domains, though). So does anybody of you know a configuration framework? It does not necessary have to be free of cost.
I know how to google ;-) but I'd appreciate some experiences about a framework you already used.
Thanks in advance!
Flo
I also work on a big SOA project. We are using Nini and it is quite good.
Here are some of the features :
Multiple configuration types INI,
XML, Registry, and command line
Strong variable types String,
int, float, etc. Eliminates casts
Set and save Add, remove, edit,
and save configs
Lightweight and fast Small
footprint, built for speed
Merging Merge several configs
into one
100% free Free and open source
code
Value aliases Add aliases for
unclear variables
Key value replacement Replaces
values with other key values
Cross platform Run on .NET/Mono
Linux/Mac/Windows
INI parser Contains a 100%
managed INI parser
Fully documented See the Nini
manual and API reference
Unlimited files/sources Loads an
unlimited number of files
Compact Framework Supports the
.NET Compact Framework
Command line application Has a
command-line configuration editor
Mature and stable Over 140 unit
tests
Have a look at it.

Where can I find an open source C# project that uses ADO.NET? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am trying to write a Windows Form and ASP.NET C# front-end and MSAccess backend for a pretty small database concept I have.
I have written this application once before in just MSAccess but I now need the app and database to be in different places. I have now figured out (thanks to a StackOverflow user) that ADO will be a bad choice because it has to have a connection open all of the time.
I bought Microsoft ADO.Net 2.0 Step-by-Step and I have read through some of it and understand (I think) the basic concepts at play in ADO.NET. (Datasets and the like)
Where I get confused is the actual implementation. What I want to know is do any of you know of a C# project that has a database backend which is open source that I can go look at the code and see how they did it. I find I learn better that way. The book has a CD with code examples that I may turn to, but I would rather see real code in a real app.
I haven't used this but it looks like it might be a good fit:
http://www.codeproject.com/KB/database/DBaseFactGenerics.aspx
Take a look at the MySQL .net connector. It is the nuts and bolts of how the ADO.net classes talk to the DB engine. ADO.net as a whole does not keep connections open. Certain higher level classes do. Technically the lower level objects such as the connection and command objects are part of ADO.net, but you have a high degree of control over them.
Check CodePlex, they have a ton of .NET projects. I can't think of specific ones that fit your requirements, but you should be able to find something.
www.codeplex.com
I found this post http://www.codeproject.com/KB/database/DatabaseAcessWithAdoNet1.aspx by searching for ADO.NET on the codeproject so I am going to give Chris Porter the answer points. Thanks everyone for the help.

Categories

Resources