模拟实体框架数据库 [英] Mock Entity Framework database

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

问题描述

我使用实体框架4 +。

I am using Entity Framework 4+.

是否有可能从一些随机数据的模式自动生成某些模拟数据库?其中的int,把整数,其中弦,放一些的GUID或任何...

Is it possible to automatically create some MOCK database from the schema with some random data? Where ints, put ints, where strings, put some GUIDs or whatever...

这会帮我调试我的应用程序有很多。

It would help me to debug my application a lot.

感谢您,詹姆斯

推荐答案

转到此链接,看看这部分播种初期在自动创建的数据库中的数据

Goto this link and have a look at this section "Seeding Initial Data in Automatically Created Databases"

http://weblogs.asp.net/scottgu/archive/2010/07/16/code-first-development-with-entity-framework- 4.aspx

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

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