EF Core In-Memory Database Provider
This can be useful for testing, although the SQLite provider in in-memory mode may be a more appropriate test replacement for relational databases.
Supported Database Engines
- Built-in in-memory database (designed for testing purposes only)
Supported Platforms
.NET Framework (4.5.1 onwards)
.NET Core
Mono (4.2.0 onwards)
Universal Windows Platform
The InMemory provider is useful when you want to test components using something that approximates connecting to the real database, without the overhead of actual database operations.
InMemory is not a relational database
EF Core database providers do not have to be relational databases. InMemory is designed to be a general purpose database for testing, and is not designed to mimic a relational database.
Some examples of this include:
InMemory will allow you to save data that would violate referential integrity constraints in a relational database.
If you use DefaultValueSql(string) for a property in your model, this is a relational database API and will have no effect when running against InMemory.
For many test purposes these differences will not matter. However, if you want to test against something that behaves more like a true relational database, then consider using SQLite in-memory mode.
EF Core In-Memory Database Provider的更多相关文章
- ASP.NET Core 开发-Entity Framework (EF) Core 1.0 Database First
ASP.NET Core 开发-Entity Framework Core 1.0 Database First,ASP.NET Core 1.0 EF Core操作数据库. Entity Frame ...
- ASP.NET Core 开发 - Entity Framework (EF) Core
EF Core 1.0 Database First http://www.cnblogs.com/linezero/p/EFCoreDBFirst.html ASP.NET Core 开发 - En ...
- .Net Core+Angular6 学习 第四部分(EF Core(Code First))
目的: 打算通过EF core 练习从database receive data 显示到UI. 1. 创建一个新的project Model.定义一个 base interface entity以及实 ...
- EF core 性能调优
Entity Framework Core performance tuning – a worked example Last Updated: February 25, 2019 | Create ...
- SQLite EF Core Database Provider
原文链接 This database provider allows Entity Framework Core to be used with SQLite. The provider is mai ...
- 一起学ASP.NET Core 2.0学习笔记(二): ef core2.0 及mysql provider 、Fluent API相关配置及迁移
不得不说微软的技术迭代还是很快的,上了微软的船就得跟着她走下去,前文一起学ASP.NET Core 2.0学习笔记(一): CentOS下 .net core2 sdk nginx.superviso ...
- MySql Scaffolding an Existing Database in EF Core
官方文档详见:https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework-core-scaffold-exampl ...
- 在EF Core里面如何使用以前EntityFramework的DbContext.Database.SqlQuery<SomeModel>自定义查询
问: With Entity Framework Core removing dbData.Database.SqlQuery<SomeModel> I can't find a solu ...
- 记录在EF Core级联更新时出现的错误The database operation was expected to affect 1 row(s), but actually affected 0 row(s) (低级错误导致)
错误提示:The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data ma ...
随机推荐
- windows下配置lua环境
1.进入lua官网http://www.lua.org/ 2.点击download 3.点击get a binary 4.点击[Lua - joedf's Builds] 5.选择适合自己的版本下载, ...
- 【2017-03-23】CSS基础:内联样式
CSS:层叠式样式表 1.对层标签整体进行操作 <div style="width:200px;height:200px;background-color:blue"> ...
- SLAM学习笔记 - ORB_SLAM2源码运行及分析
参考资料: DBow2的理解 单目跑TUM数据集的运行和函数调用过程 跑数据集不需要ros和相机标定,进入ORB_SLAM目录,执行以下命令: ./Examples/Monocluar/mono_tu ...
- A stock
1. 密集成交不太妙 主力抛压退为好
- eclipse 安装和使用AmaterasUML
1. 安装AmaterasUML前,需要先安装GEF(Eclipse Graphical Editing Framework (GEF)) 采用eclipse在线安装方式安装就好. a. 查看ecli ...
- flask 使用宏渲染表单(包含错误信息)
在模板中渲染表单时,有大量的工作: 1.调用字段属性,获取<input>定义 2.调用对应的label属性,获取<label>定义 3.渲染错误消息 为了避免为每一个字段重复这 ...
- 进程表示之进程ID号
UNIX进程总是会分配一个号码用于在其命名空间总唯一地标识它们,该号码称作进程ID号,简称PID. 1.进程ID 但每个进程除了PID外,还有其他的ID,有下列几种可能的类型: (1)处于某个线程组中 ...
- Django 应用 静态文件配置
Django 应用 <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...
- C++中虚函数的作用
一, 什么是虚函数(如果不知道虚函数为何物,但有急切的想知道,那你就应该从这里开始) 简单地说,那些被virtual关键字修饰的成员函数,就是虚函数.虚函数的作用,用专业术语来解释就是实现多态性(Po ...
- Cheerleaders UVA - 11806
题目大意是: 在一个m行n列的矩形网格中放置k个相同的石子,问有多少种方法?每个格子最多放一个石子,所有石子都要用完,并且第一行.最后一行.第一列.最后一列都要有石子. 容斥原理.如果只是n * m放 ...