简体   繁体   English

Pomelo.EntityFrameworkCore.MySql MySqlGeometry、EntityframeworkCore 迁移失败

[英]Pomelo.EntityFrameworkCore.MySql MySqlGeometry, EntityframeworkCore Migrations failed

This is a simple case of use dotnet-ef migration tool to generate the MySQL database.这是使用 dotnet-ef 迁移工具生成 MySQL 数据库的简单案例。

I have Pomelo.EntityFrameworkCore.MySql as the MySQL DB connector and class property:我有 Pomelo.EntityFrameworkCore.MySql 作为 MySQL DB 连接器和类属性:

public MySqlGeometry Location { get; set; }

The MySqlGeometry datatype supported by Mysql.Data.Types come with Pomelo package. Mysql.Data.Types 支持的 MySqlGeometry 数据类型随 Pomelo 包一起提供。

When I run当我跑

> dotnet ef migrations add InitialCreate

I get the following error:我收到以下错误:

No suitable constructor found for entity type 'MySqlGeometry'.找不到适合实体类型“MySqlGeometry”的构造函数。 The following constructors had parameters that could not be bound to properties of the entity type: cannot bind 'bytes' in 'MySqlGeometry(byte[] bytes)'.以下构造函数的参数无法绑定到实体类型的属性:无法绑定“MySqlGeometry(byte[] bytes)”中的“bytes”。

I guess the mysql geometry data type not supported by Pomelo connector?我猜 Pomelo 连接器不支持 mysql 几何数据类型? Or EntityframeworkCore Migrations tools doesn't support the MySQLGeometry data type?或者 EntityframeworkCore 迁移工具不支持 MySQLGeometry 数据类型? Or I miss any datatype package to support it.或者我错过了任何支持它的数据类型包。

While MySqlGeometry is supported by MySqlConnector (the underlying library used by Pomelo), it is not yet supported by Pomelo itself.尽管 MySqlConnector(Pomelo 使用的底层库)支持MySqlGeometry ,但 Pomelo 本身尚不支持。

We have spatial data type support planned as a feature for the 3.1.0 release.我们计划将空间数据类型支持作为3.1.0版本的一项功能。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Nlog 与 Pomelo.EntityFrameworkCore.MySql - Nlog with Pomelo.EntityFrameworkCore.MySql 使用 Pomelo.EntityFrameworkCore.MySql 使用 EntityFramework 创建表 - Create Tables with EntityFramework using Pomelo.EntityFrameworkCore.MySql Pomelo.EntityFrameworkCore.MySql 数据库优先和生成的列 - Pomelo.EntityFrameworkCore.MySql Database first and Generated column 无法找到名称为 Pomelo.EntityFrameworkCore.MySql 的提供程序程序集 - Unable to find provider assembly with name Pomelo.EntityFrameworkCore.MySql Pomelo.EntityFrameworkCore.MySql 访问属性时出现问题 - Pomelo.EntityFrameworkCore.MySql problem when access property EF Core 3.0 的 Pomelo.EntityFrameworkCore.MySql 错误 - Pomelo.EntityFrameworkCore.MySql error with EF Core 3.0 使用 Pomelo.EntityFrameworkCore.MySql v6 从 .network 上的另一台设备连接时出错 - Error while connecting from another device on the network,using Pomelo.EntityFrameworkCore.MySql v6 如何在没有登录凭据的情况下编写连接字符串 .net MySqlConnector/Pomelo.EntityFrameworkCore.MySql? - How to compose a connection string without login credentials .net MySqlConnector/Pomelo.EntityFrameworkCore.MySql? 尝试在与 Pomelo.EntityFrameworkCore.MySql 相关的 dotnet core 3.1 中添加迁移时出错 - Getting error when trying to add migration in dotnet core 3.1 related to Pomelo.EntityFrameworkCore.MySql 我可以在.NET Framework 4.x中使用Pomelo.EntityFrameworkCore.MySql吗? - Can I use Pomelo.EntityFrameworkCore.MySql with .NET Framework 4.x?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM