在C#程序中保存数据方面需要帮助 [英] Need help with saving data in C# program

查看:77
本文介绍了在C#程序中保存数据方面需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个程序,该程序最好从文本框(Windows窗体应用程序)获取用户输入,并且代码将标识一个对象并为其分配成员(例如:夹克是黑色的",并且该代码将标识该对象作为外套,并为其赋予黑色属性).可以识别我可以处理的对象及其属性的代码,但是我几乎没有在数据库中存储数据的经验,但是最有效的方法就是存储它.

我还需要能够检查一下是否已经创建了一个夹克"对象,如果没有创建该对象及其属性,以及是否存在,它将简单地将属性添加到已经存在的类中.

感谢您提供的所有帮助.

I am working on a program that ideally would take user input from a text box (windows form application) and the code would identify an object and assign members to it (example: "the jacket is black" and the code would identify the object as jacket and give it an attribute of black). The code to identify the object and its attribute I can handle, but I have very little experience with storing data in a database or however the most efficient way would be to store this would be.

Also I would need to be able to have the code check if there is a "jacket" object already created and if not create the object as well as its attributes and if there is, it would simply add the attributes to the already existing class.

Thanks for any and all help.

推荐答案

由于您对数据库方面的经验很少,因此您可能希望先学习ADO.Net [ ^ ].
Since you have little experience on the database part, you might want to start by learning ADO.Net[^].


除了walterhevedeich建议的内容外,我建议您了解数据库的思想.

http://en.wikipedia.org/wiki/数据库 [ http://en.wikipedia.org/wiki/Database_management_system [ http://en.wikipedia.org/wiki/Binary_relation [ http://en.wikipedia.org/wiki/Relational_algebra [ http://en.wikipedia.org/wiki/Relational_model [ http://en.wikipedia.org/wiki/Relational_database [ http://en.wikipedia.org/wiki/Relational_database_management_system [
In addition to what walterhevedeich advised, I would suggest you learn about the ideas of databases.

http://en.wikipedia.org/wiki/Database[^],
http://en.wikipedia.org/wiki/Database_management_system[^],
http://en.wikipedia.org/wiki/Binary_relation[^],
http://en.wikipedia.org/wiki/Relational_algebra[^],
http://en.wikipedia.org/wiki/Relational_model[^],
http://en.wikipedia.org/wiki/Relational_database[^],
http://en.wikipedia.org/wiki/Relational_database_management_system[^].

Maybe the encyclopedia cannot replace education, and you really need some pretty basic education, not just some concrete technical knowledge. At least these encyclopedia can show you the scope of required education. Also, it needs some practice of analyzing of real-life concepts and mapping them onto relational model.

Also, understanding of ADO.NET requires good understanding of OOP.
Only based on that, or in parallel with that, you can learn ADO.NET and get to using it practically.

Good luck,
—SA


这篇关于在C#程序中保存数据方面需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆