将数据从文本框保存到实体框架模型
问题描述:
是否可以将文本框中的数据保存到实体框架模型中,然后将其保存到数据库中。
我不知道该怎么做但没有想法如何处理这个问题。
我来到这里之前看过的论坛并没有多大帮助。
数据库名称为: dbAttendance
表名: tblGroup
列: PK_GroupID , GroupName
i尝试过saveChanges()和AddObject,但是它们没有用。
非常感谢任何帮助。
Is it possible to save data from textboxes to a entity framework model and then save it to the database.
Im not sure how to do this and have no idea how to approach this.
the forums i looked at before coming here haven''t helped much.
The database name is: dbAttendance
Table Name: tblGroup
Columns: PK_GroupID, GroupName
i have tried the saveChanges() and the AddObject, but they didn''t work.
Any help would be greatly appreciated.
答
这篇文章链接在今天的CodeProject新闻信中,它可能会给你关于如何实现目标的一些提示和技巧:
http://endyourif.com/entity-framework-beginners-guide-done-right/ [ ^ ]
This article was linked in todays CodeProject news letter, it might give you some hints and tips on how to achieve what you are after:
http://endyourif.com/entity-framework-beginners-guide-done-right/[^]