草庐IT

Multilingual_entity

全部标签

c# - 存储过程无法在 Entity Framework 中创建复杂类型

我已经通过phpmyadmin添加了这个存储过程:CREATEDEFINER=`root`@`localhost`PROCEDURE`SelectUser`()LANGUAGESQLNOTDETERMINISTICNOSQLSQLSECURITYDEFINERCOMMENT''Select*fromUser在我的edmx中,但是当创建一个复杂类型并执行给出的获取列信息时Thestoreprocedurereturnsnocolumns 最佳答案 尝试添加SETFMTONLYOFF在你的sql语句中

git push代码报错:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

gitpush代码的时候报错:TheremoteendhungupunexpectedlytheremoteendhungupunexpectedlyRPCfailed;HTTP413curl22TherequestedURLreturnederror:413RequestEntityTooLarge。方法1:增大httppostbuffer在gitbash中执行:gitconfighttp.postBuffer524288000然后再push但是我用这种方法不管用(如果code=411,则是由postBuffer引起的,可以在客户端执行gitconfig--globalhttp.postBu

c# - Entity Framework Code First MySql 复数表

我正在使用代码优先的MicrosoftEntityFramework来管理我的数据(使用MySQL)。我已经定义了一个POCO对象,但是,当我尝试添加数据时,它说表用户不存在。我查看了数据库,它创建了表用户而不是用户。我该如何补救?这让我抓狂!谢谢!publicclassUser{[Key,Required]publicintUserId{get;set;}[StringLength(20),Required]publicstringUserName{get;set;}[StringLength(30),Required]publicstringPassword{get;set;}[S

C# Entity Framework : Keyword not supported: 'port'

您好,我有多个项目连接到某个数据库,即CodeFirstEntityFramework。除了一个顽固的项目外,所有项目都能够成功连接。我得到的错误是:Keywordnotsupported:'port'我浏览了无数的stackoverflow问题、mysql论坛、EntityFramework论坛等,包括:MappingExceptionEdm.StringnotcompatiblewithSqlServer.varbinaryKeywordnotsupportedinMySQL'sconnectionstringKeywordnotsupported:'metadata'+MySQL

mysql - 如何使用 byte[] 在 Entity Framework Core 的 MySQL 中存储 'blob' 类型?

我的代码优先模型如下所示:publicclassDocument{[Key]publicintDocumentId{get;set;}[Required]publicbyte[]Blob{get;set;}}我希望将其映射到MySQL中的blob数据类型,但我不断收到varbinary(255)如何让它映射到“blob”? 最佳答案 我用了Pomelo.EntityFrameworkCore.MySql解决我的问题。 关于mysql-如何使用byte[]在EntityFrameworkC

mysql - Entity Framework 迁移 "Table does not exist"

我是EntityFramework的新手,我从我在mysqlworkbench中创建的Mysql数据库的逆向工程创建了我的实体,然后我在我的实体中添加了一些外键,然后我添加了一个迁移并尝试更新我的数据库但是发生错误,它表示:“表‘pidev.pidev.personal’不存在”。“pidev”是我的数据库的名称。personal是另外两个子类“candiadte”和“employee”的父类(superclass),我使用TPH作为继承策略。PLZ我需要一些帮助。 最佳答案 谢谢大家的回复,我解决了迁移文件中UP()和DOWN()

Mysql Entity Framework 问题 - 指定的键太长;最大 key 长度为 3072 字节

当我使用这个命令时:$dotnetefdatabaseupdate我收到这个错误:Specifiedkeywastoolong;maxkeylengthis3072bytes导致这个错误的表是微软内置的用户管理表:CREATETABLE`AspNetUserLogins`(`LoginProvider`varchar(767)NOTNULL,`ProviderKey`varchar(767)NOTNULL,`ProviderDisplayName`textNULL,`UserId`varchar(767)NOTNULL,PRIMARYKEY(`LoginProvider`,`Provi

c# - Entity Framework 和 MySQL 的随机顺序

总结:我想找到一种使用EntityFramework和MySQL进行随机排序的方法(这很重要)。该解决方案不应使用原始sql查询或在从数据库加载所有值后进行排序。我尝试过的:我想到使用NewGuid()从thatanswer随机排序.代码:varquery=fromeincontext.TableorderbyGuid.NewGuid()selecte;vartest=query.FirstOrDefault();总是抛出异常:Anerroroccurredwhileexecutingthecommanddefinition.Seetheinnerexceptionfordetails

java - JBoss6 JPA : Entity with @Lob results in GenericJDBCException

我有一个带有@Lob注释的简单EntityBean。如果我删除这个注解,我在JBossAS6.0.0.Final和MySQL5上不会出错。但是如果我用@Lob注释它(因为在我的例子中mt包含大约100到5000个字符),如果我坚持实体,我的测试环境会出错。没有@Lob:mt被映射到VARCHAR使用@Lob:mt映射到LONGTEXT(这是我想要的,但我得到错误)这是我的实体:@Entity@Table(name="Description")publicclassDescriptionimplementsSerializable{publicstaticfinallongserialV

mysql - 如何先使用MySql和Entity Framework 4.1代码

我正在尝试在MVCMusicStore中使用MySQL数据库http://mvcmusicstore.codeplex.com/而不是MSSQL。我想学习使用MySQL进行代码优先开发。我已将这些代码添加到web.configMySQL数据库已创建,但表尚未创建。我刚刚添加了对我的项目的Mysql.Data.MySQLClient.dll引用。我有这种异常(exception):Anerroroccurredcreatingtheconfigurationsectionhandlerforsystem.data:Column'InvariantName'isconstrainedtob