草庐IT

Entity-Component

全部标签

c# - Entity Framework 不保存修改后的 child

令人沮丧,这个。这是由数据库优先EntityFramework生成的一对相关对象:publicpartialclassDevelopmentType{publicDevelopmentType(){this.DefaultCharges=newHashSet();}publicSystem.GuidRowId{get;set;}publicstringType{get;set;}publicvirtualICollectionDefaultCharges{get;set;}}publicpartialclassDefaultCharge{publicSystem.GuidRowId{g

c# - 修改了 Entity Framework 集合;枚举操作可能无法执行

我目前使用的是EF4.0。我的目标是删除子集合并将新子集合添加到同一父集合。publicvoidAddKids(intparentId,KidsnewKids){using(ModelContainercontext=newModelContainer(connectionString)){using(TransactionScopescope=newTransactionScope()){varquery=fromParent_parentincontext.Parentswhere_parent.ParentId==parentIdselect_parent;Parentparen

c# - 修改了 Entity Framework 集合;枚举操作可能无法执行

我目前使用的是EF4.0。我的目标是删除子集合并将新子集合添加到同一父集合。publicvoidAddKids(intparentId,KidsnewKids){using(ModelContainercontext=newModelContainer(connectionString)){using(TransactionScopescope=newTransactionScope()){varquery=fromParent_parentincontext.Parentswhere_parent.ParentId==parentIdselect_parent;Parentparen

uniapp开发小程序引入组件报错Component is not found in path

在使用uniapp开发小程序时,由于分包遇到了一个问题,引入其他分包的组件时报错Componentisnotfoundinpath 小程序报错 后来发现,引用其他包的资源都会报错,之前只知道分包不能使用主包资源,不知道分包之间的资源也不能共用。将需要的组件复制一份过来就行了。经验不足,有什么说的不对的地方可以留言指出,如果本文能够帮助到您,希望可以得到您的关注+赞。 

c# - Entity Framework - 外键组件......不是类型的声明属性

我有以下模型publicclassFilanthropyEvent:EntityBase,IDeleteable{publicintId{get;set;}publicstringName{get;set;}publicDateTimeEventDate{get;set;}publicstringDescription{get;set;}publicdecimalTarget{get;set;}publicdecimalEntryFee{get;set;}publicboolDeleted{get;set;}publicICollectionEventAttendees{get;set

c# - Entity Framework - 外键组件......不是类型的声明属性

我有以下模型publicclassFilanthropyEvent:EntityBase,IDeleteable{publicintId{get;set;}publicstringName{get;set;}publicDateTimeEventDate{get;set;}publicstringDescription{get;set;}publicdecimalTarget{get;set;}publicdecimalEntryFee{get;set;}publicboolDeleted{get;set;}publicICollectionEventAttendees{get;set

c# - Entity Framework : Unrecognized element 'providers' exception

当我将EntityFramework5.0.0与.NET4.0一起使用时,我在运行时遇到了一个Unrecognizedelement'providers'异常。实际上,对于.NET4.0,当我使用NuGet执行安装包时,加载的是EntityFramework4.4.0版。当我从资源管理器检查文件的属性时,我可以看到:这是我的配置文件我感觉EntityFramework4.4.0无法识别标签。我可以只删除或重命名该部分吗?当我删除该部分时,我得到另一个异常:底层提供程序打开失败。 最佳答案 我在使用Nuget将EF从版本6降级到版本5

c# - Entity Framework : Unrecognized element 'providers' exception

当我将EntityFramework5.0.0与.NET4.0一起使用时,我在运行时遇到了一个Unrecognizedelement'providers'异常。实际上,对于.NET4.0,当我使用NuGet执行安装包时,加载的是EntityFramework4.4.0版。当我从资源管理器检查文件的属性时,我可以看到:这是我的配置文件我感觉EntityFramework4.4.0无法识别标签。我可以只删除或重命名该部分吗?当我删除该部分时,我得到另一个异常:底层提供程序打开失败。 最佳答案 我在使用Nuget将EF从版本6降级到版本5

c# - 如何关闭 Entity Framework 5 的复数表创建?

我正在尝试使用EntityFramework5。第一个问题是EF会自动创建表。我试图通过包括dbModelBuilder.Conventions.Remove().第二个问题是这样的错误Themodelbackingthe'CountryContext'contexthaschangedsincethedatabasewascreated.ConsiderusingCodeFirstMigrationstoupdatethedatabase.我尝试通过dbModelBuilder.Conventions.Remove();修复它但没有意义。下一个数据访问层:Table(Name="tb

c# - 如何关闭 Entity Framework 5 的复数表创建?

我正在尝试使用EntityFramework5。第一个问题是EF会自动创建表。我试图通过包括dbModelBuilder.Conventions.Remove().第二个问题是这样的错误Themodelbackingthe'CountryContext'contexthaschangedsincethedatabasewascreated.ConsiderusingCodeFirstMigrationstoupdatethedatabase.我尝试通过dbModelBuilder.Conventions.Remove();修复它但没有意义。下一个数据访问层:Table(Name="tb