将数据从文本框保存到实体框架模型 [英] Save data from textbox to entity framework model

查看:71
本文介绍了将数据从文本框保存到实体框架模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将文本框中的数据保存到实体框架模型中,然后将其保存到数据库中。



我不知道该怎么做但没有想法如何处理这个问题。



我来到这里之前看过的论坛并没有多大帮助。



数据库名称为: 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/[^]


这篇关于将数据从文本框保存到实体框架模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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