使用实体框架进行单元测试 [英] Unit testing with Entity Framework

查看:52
本文介绍了使用实体框架进行单元测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测试使用实体框架构建的实体. 我担心的是,使用实体框架意味着直接使用数据源. 那么有什么想法可以对基于Entity Framework的组件进行单元测试?

I want to test my Entities that are built using Entity Framework. My concern is that using Entity Framework means directly working with data source. So any ideas how to unit testing Entity Framework based components?

推荐答案

对于Enity Framework 4,这看起来很有希望:可测试性和实体框架4.0

For Enity Framework 4, this looks promising: Testability and Entity Framework 4.0

这篇关于使用实体框架进行单元测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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