开发环境 WIN10 Entity Framework6.0 MVC5.0 开发工具 VS2015 SqlServer2012 1.创建上下文Context继承DbContext,并创建其他的业务类,这些业务类会创建对应的数据表. public class AccountContext:DbContext { public AccountContext():base("AccountContext") { } public DbSet<SysUser> SysUser…
sql server 脚本创建数据库邮件代码: --脚本创建数据库邮件 --1.开启数据库邮件 RECONFIGURE WITH OVERRIDE GO RECONFIGURE WITH OVERRIDE GO --2.创建邮件帐户信息 EXEC msdb..sysmail_add_account_sp @ACCOUNT_NAME ='houpeidong',--邮件帐户名称 @EMAIL_ADDRESS ='houpeidong@126.com',--发件人邮件地址 @DISPLAY_NAME…
这是一个控制台程序,作用是通过Code First创建数据库. 1.添加EntityFrameWork的引用. 2.添加类 CodeFirstTest1.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.Entity; namespace ConsoleApplication…
MySQL创建数据库 只想sql文件创建表时候提示 The 'InnoDB' feature is disabled; you need MySQL built with 'InnoDB' to have it working 原因: 有可能是mysql配置文件my.ini文件中skip-innodb 开启了 ,找到mysql目录找到my.ini文件搜索定位到skip-innodb 解决办法 前面加上# ---->#skip-innodb 重新启动mysql 开始输入cmd--->右键管理员…