使用MVC4中的Entity框架在临时数据表中进行CRUD操作 [英] CRUD operation in temporary datatable using Entity framework in MVC4

查看:77
本文介绍了使用MVC4中的Entity框架在临时数据表中进行CRUD操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在临时网格上执行CRUD操作。 (例如,产品名称,尺寸,数量,金额)。我创建了一个包含所有属性的产品类(实体)。

功能是:

用户可以一次添加多个产品并将其保存到临时表中(注意:不要打到数据库)。他可以对临时保存的数据执行CRUD操作。

添加所有产品后,最终所有数据将一次保存到数据库。



我正在使用MVC4和EntityFramework Code First和SQL Server 2008数据库。我不想将EntityDataModel用于数据库(不在当前解决方案中),我的数据库在远程服务器上。



我正在寻找解决方案。

谢谢。

解决方案

如果您不想使用远程数据库,可以简单地使用txt或sqllite或acess作为数据库。

I want to perform a CRUD operation on temporary grid. (For Eg. ProductName, size, Quantity, Amount). I Have created a class of product(Entity) with all properties.
The functionality is:
The user can add multiple products at a time and it saved to temporary table(note: not hit to database). As well as he can perform the CRUD operation on temporary saved data.
After adding all the products, finally all data will be saved to database at a time.

I am using MVC4 with EntityFramework Code First and SQL Server 2008 database. I dont want to use EntityDataModel for database(not in current solution), my database is on remote server.

I am looking for a solution.
Thank You.

解决方案

if you don't want to use remote database ,you can use txt or sqllite or acess as your database simplely .


这篇关于使用MVC4中的Entity框架在临时数据表中进行CRUD操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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