• 一、mysql environment

When we create an new database,first We need draw er diagram for somebody to show your idea,but our company have no good

authorised tool to design sqlserver ER diagram,so I use mysql graphical tool to design it, after that,you can use mysql to create edmx

us entityframwork,and use this edmx to create new sqlserver database or table.The following is details:

1、first you need install mysql,the download address is http://dev.mysql.com/downloads/windows/installer/,this version is no need to install,

after that,you need install mysql,the install detail and config,you can see the article.

http://laizetian.blog.51cto.com/10728827/1786180,

for operating mysql database conviniently,you can download grapahics tool workbencn

https://dev.mysql.com/downloads/workbench/.

after you create new datatable use mysql.

二、EntityFrameWork 6.0.0.0 connect Mysql to create EF

you can folling the article to install http://www.cnblogs.com/dunitian/p/4755585.html

note:(1)you need install MySQL for Visual Studio and Connector/Net correctly,otherwise you will happen some terrible,

for example;you will not find  mysql Databse option。

(2)if you have isntall ef,but don't find  ADO.Net entity Data Model,maybe you have make something wrong,you

can uninstall Entity framework at control panel and reinstall it.

三、EF edmx create sqlserver database。

1、you can use Generate Database from Model to create sqlserver table

2、change connection Type to Sql server  and connect to database you want to create table

 

2、Next you will meet the following error

you need change edmx file xml,click right mouse on edmx file,and you will find the following and

edit。

use

<Schema Namespace="RightsDataModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2012" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">

replace <Schema Namespace="mydbModel.Store" Provider="MySql.Data.MySqlClient" ProviderManifestToken="5.7" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">

after that,you build project,you will find the following error,you need delete Precision and rebuild again.

If you want define table column type,you can define at this palce,and it will affect database table type。

After that,you can use Generate Database from Model ,you can see the following window means

it is success,you can copy script to sqlserver studio to execute it or not。

Mysql –>EF edmx(model first)–> Sql server table的更多相关文章

  1. mySql学习笔记:比sql server书写要简单

    在学mySql.总的感觉,mySql与Sql Server差不多,语法都很象,但mySql也许是吸取了SQL SERVER的一些经验,SQL语句书写起来更加简单. 比如说,设置主键.索引,SQL SE ...

  2. mysql 内置函数和sql server 内置函数的区别

    以下函数均没有对参数做说明,使用的使用需要了解其参数内容 数据库 sql server mysql oracle 举例 获得当前系统时间 getdate() now() sysdate  注意不是函数 ...

  3. .Net EF Core数据库使用SQL server 2008 R2分页报错How to avoid the “Incorrect syntax near 'OFFSET'. Invalid usage of the option NEXT in the FETCH statement.”

    一.  问题说明 最近.Net EF core 程序部署到服务器,服务器数据库安装的是SQL server 2008 R2,我本地用的的是SQL server 2014,在用到分页查询时报错如下: H ...

  4. MySql的数据导入到Sql Server数据库中

    步骤一:安装MySql驱动 驱动下载链接:https://dev.mysql.com/downloads/connector/odbc/ 下载完成后安装, 一路Next即可 步骤二:创建DSN DSN ...

  5. 2019-03-28 SQL Server Table

    -- table 是实际表 view是虚表.你可以认为view是一个查询的结果 -- 声明@tbBonds table declare @tbBonds table(TrustBondId int n ...

  6. 数据库 SQL Server 到 MySQL 迁移方法总结

    最近接手一起老项目数据库 SQL Server 到 MySQL 的迁移.因此迁移前进行了一些调查和总结.下面是一些 SQL Server 到 MySQL 的迁移方法. 1. 使用 SQLyog 迁移 ...

  7. SQL Server和MySQL数据库

    导读:接下来的网上商城的项目,需要用到MySQL数据库了.这个对于我来说,是一个新接触的东西,按照惯例,在刚开始学习一个东西的时候,先从宏观上去了解它.本篇博客,先介绍SQL Server的基本内容, ...

  8. 从SQL Server到MySQL,近百亿数据量迁移实战

    从SQL Server到MySQL,近百亿数据量迁移实战 狄敬超(3D) 2018-05-29 10:52:48 212 沪江成立于 2001 年,作为较早期的教育学习网站,当时技术选型范围并不大:J ...

  9. abp项目 从sql server迁移至mysql

    官方资料:https://aspnetboilerplate.com/Pages/Documents/EF-MySql-Integration 实验发现,还差了两步 整理一下,步骤如下: 1.引用My ...

随机推荐

  1. 彩色的Shell

    我常在命令行下工作,以前老被同事说"你整天在那个黑窗口上倒腾什么?" 现在这个问题变成了"你这个花花绿绿的窗口是什么东西?" 其实都是同一个东西:一个兼容于xterm的终端窗口,要么是PuTTY/Ki ...

  2. hdu1251在词典里统计前缀出现的个数

    banana band bee absolute acm    ba b band abc #include<iostream> using namespace std; //数据结构 s ...

  3. [原]OpenGL基础教程(四)VBO+纹理绘制四边形

    工程下载地址:http://pan.baidu.com/s/1ntr7NHv 提取码:yf1h 一.本文牵扯知识点梳理: (1)VBO (2)纹理 (3)libpng(加载png) (4)shader ...

  4. js日期时间比较函数

    转自:http://www.cnblogs.com/zxjyuan/archive/2010/09/07/1820708.html js日期比较(yyyy-mm-dd) function duibi( ...

  5. [转]pycharm 2016 注册码

    pycharm 2016 注册码 复制 43B4A73YYJ-eyJsaWNlbnNlSWQiOiI0M0I0QTczWVlKIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiY ...

  6. U3D包大小优化之microlib

    当迩想把最小类库发上来,迩需要把Stripping Level设置为Use micro mscorlib 这里是MICROLIB所能使用的包的类库列表:http://docs.unity3d.com/ ...

  7. 正向代理VS反向代理 总结

    1.访问方向 正向代理:通常是从内部访问外部的网站或服务器,但又无法直接访问到外部的网站,而这个代理是可以访问到外部网站的.如果在中国境内通过代理访问Facebook.Twitter等网站 反向代理: ...

  8. 使用JavaScript判断用户是否为手机设备

    最近在做微信服务号开发,其中遇到一个问题是微信服务号查看的个人的消息,如果点击在浏览器中查看(iOS中是在Safari中打开)应该是跳转到登录页面,因为页面需要从后台获取,因为需要服务端判断,如果是存 ...

  9. JS对象的几个方法介绍

    1.hasOwnProperty 判断是不是对象自身的属性,如果是继承的返回false否则true function Fn(){ } Fn.prototype.num = 10; var obj = ...

  10. VC2013的一个bug

    前段时间在尝试使用一个C++的GUI库nana.这个库最大的特点在于使用现代C++风格去编写GUI程序,而不需要使用大量的比较丑陋的代码(如MFC中的各种宏),或者其它的非C++元素.这是一个比较新的 ...