Entity Framework Code-First(3):Setup Environment
Setup Development Environment for EF Code-First:
Let's setup the development environment for Code-First before starting on it.
Install the following tools to work with Entity Framework Code-First:
- .NET Framework 4.5
- Visual Studio 2012
- MS SQL Server 2008/2012 Express
Install EF via Nuget:
Here, we will install Entity Framework API (EntityFramework.dll) via NuGet in the VS 2012 console application. (You can install EF via NuGet the same way in any version of Visual Studio.)
First, create the console application. Right click on your project in the solution explorer and select Manage NuGet Packages..
This will open Manage NuGet Packages dialogue box. Now, select Online in the left bar and search for EntityFramework as shown below.
This will search for all the packages related to Entity Framework. Select EntityFramework and click on Install.
Click on the I Accept button in the License Acceptance dialogue box to start the installation.
After installation, make sure that the appropriate version of EntityFramework.dll is included in the project.
Now, we are ready to use Entity Framework Code-First in our sample console project. Let's start writing our first simple code-first example in the next section.
Entity Framework Code-First(3):Setup Environment的更多相关文章
- Entity Framework Tutorial Basics(4):Setup Entity Framework Environment
Setup Entity Framework Environment: Entity Framework 5.0 API was distributed in two places, in NuGet ...
- Entity Framework Code first(转载)
一.Entity Framework Code first(代码优先)使用过程 1.1Entity Framework 代码优先简介 不得不提Entity Framework Code First这个 ...
- Entity Framework Code First (三)Data Annotations
Entity Framework Code First 利用一种被称为约定(Conventions)优于配置(Configuration)的编程模式允许你使用自己的 domain classes 来表 ...
- Entity Framework Code First (二)Custom Conventions
---------------------------------------------------------------------------------------------------- ...
- Entity Framework Code First (一)Conventions
Entity Framework 简言之就是一个ORM(Object-Relational Mapper)框架. Code First 使得你能够通过C#的类来描述一个模型,模型如何被发现/检测就是通 ...
- Entity Framework Tutorial Basics(11):Code First
Code First development with Entity Framework: Entity Framework supports three different development ...
- Entity Framework Code First (七)空间数据类型 Spatial Data Types
声明:本文针对 EF5+, Visual Studio 2012+ 空间数据类型(Spatial Data Types)是在 EF5 中引入的,空间数据类型表现有两种: Geography (地理学上 ...
- Entity Framework Code First (四)Fluent API - 配置属性/类型
上篇博文说过当我们定义的类不能遵循约定(Conventions)的时候,Code First 提供了两种方式来配置你的类:DataAnnotations 和 Fluent API, 本文将关注 Flu ...
- Entity Framework Code First (八)迁移 Migrations
创建初始模型和数据库 在开始使用迁移(Migrations)之前,我们需要一个 Project 和一个 Code First Model, 对于本文将使用典型的 Blog 和 Post 模型 创建一个 ...
- Entity Framework Code First (六)存储过程
声明:本文只针对 EF6+ 默认情况下,Code First 对实体进行插入.更新.删除操作是直接在表上进行的,从 EF6 开始你可以选择使用存储过程(Stored Procedures) 简单实体映 ...
随机推荐
- debian下使用ft232为stm32f429i-discovery烧写uboot和uImage
操作系统:debian 软件: openocd minicom 硬件: MiniUSB线.stm32f429i-discovery, WaveShare FT232串口模块(可以在淘宝上买到) 关 ...
- <轻量算法>根据核密度估计检测波峰算法 ---基于有限状态自动机和递归实现
原创博客,转载请联系博主! 希望我思考问题的思路,也可以给大家一些启发或者反思! 问题背景: 现在我们的手上有一组没有明确规律,但是分布有明显聚簇现象的样本点,如下图所示: 图中数据集是显然是个3维的 ...
- Python基础-MD5加密
import hashlibm = hashlib.md5()#构造一个md5 m.update(b"Hello")#加密前必须转化成二进制字节类型print(m.hexdiges ...
- Python习题-输出一个字符串中最长的子字符串及其长度
描述:有个字符串$sd1#111$svda123!!!221&eSSDSDG,包含特殊字符.数字和字母,输出最长的子字符串和他的长度#例如上面的字符串包含数字字母的字符串是svda123,长度 ...
- Python习题-列出目录下所有文件删除文件夹
需求描述: 1.当前目录下有很多文件夹.文件,统计/usr/local/这个目录下,如果是文件夹,就给删除 /usr/local/ f1 w1 f2 w2 w3 w4 ...
- NserviceBus过期处理
NserviceBus不过期,修改注册表 HKEY_CURRENT_USER\Software\NServiceBus\3.3下的项TrailDate到2099-08-02
- CI中site_url和base_url的区别
你若使用site_url("test/php/1");则实际url为 http://domain.com/index.php/test/php/1 若使用base_url(&quo ...
- CTS 2019 Pearl
CTS2019 Pearl 每种颜色有奇偶两种情况,只有偶数和只有奇数个,其对应的的指数型生成函数分别为 \(\frac{e^x+e^{-x}}2,\frac{e^x-e^{-x}}2\) 考虑选出现 ...
- WSGI服务与django的关系
WSGI接口 wsgi是将python服务器程序连接到web服务器的通用协议.uwsgi是独立的实现了wsgi协议的服务器. web服务器 服务端程序 简化版的WSGI架构 服务端程序(类似dja ...
- [转]Google开源Leak Finder—用于检测内存泄漏的JavaScript工具-----可惜,暂时打不开google的网站,下载不了
近日,Google开源了Leak Finder,这款工具可以查看JavaScript应用的堆,进而发现内存泄漏. 作为一门垃圾收集语言,JavaScript并不会出现常见的内存泄露情况,特别是像C++ ...