What is the best way to store data in c# application(在 C# 应用程序中存储数据的最佳方式是什么)
问题描述
我想制作 Cookbook 应用程序来存储和阅读(和更新)菜谱,或者其他任何东西来练习 OOP 编程和思考.但是,我不确定在 c# (Visual Studio Express) 中哪种存储数据的方式(在这种情况下为食谱)是最好的.我想在程序中优化保存和加载数据,但我没有经验.什么是最好的方法?是通过 XML、SQL 还是纯 TXT?还是其他方式?
I want to make Cookbook application for storing and reading (and updating) recipes, or anything else to practice OOP programming and thinking. But, I am not sure, what way of storing data, in this case, recipes, is the best in c# (Visual Studio Express). I want to optimize saving and loading data in program, but I have no experience. What is the best way? Is it through XML, SQL, or just plain TXT? Or some other way?
推荐答案
我建议在 SqlExpress 中使用 localDB.
I would suggest using a localDB in SqlExpress.
Microsoft® SQL Server® 2012 Express 是一款功能强大且可靠的免费提供丰富可靠的数据存储的数据管理系统适用于轻量级网站和桌面应用程序.
Microsoft® SQL Server® 2012 Express is a powerful and reliable free data management system that delivers a rich and reliable data store for lightweight Web Sites and desktop applications.
http://blogs.msdn.com/b/sqlexpress/archive/2011/07/12/introducing-localdb-a-better-sql-express.aspx
http://technet.microsoft.com/en-us/library/hh510202.aspx
你也可以看看这个类似的问题.
You could also look at this similar question.
这里是关于 XML 与 DB,这表明 XML 正在失势.
Here as an article on XML vs. DB which shows XML is losing ground.
这篇关于在 C# 应用程序中存储数据的最佳方式是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 C# 应用程序中存储数据的最佳方式是什么
基础教程推荐
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- C# 从 List<List<int>> 中删除重 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- WPF 模态进度窗口 2022-01-01
