开发者

Entity Framework Why Add Entity "User" And Property "CreateUser" Got Error?

开发者 https://www.devze.com 2023-02-10 13:57 出处:网络
This common model, although the following error will occur, but does not affect the Build! Error1Error 6029: The member \'CreateUser\' on the type \'Model1.User\' conflicts 开发者_如何学Gowith the ge

This common model, although the following error will occur, but does not affect the Build!

Error 1 Error 6029: The member 'CreateUser' on the type 'Model1.User' conflicts 开发者_如何学Gowith the generated factory method. d:\Projects\ClassLibrary1\ClassLibrary1\Model1.edmx 1 1 ClassLibrary1

But Build succeeded

Is this is a bug?


I ran into this problem as well. The issue was that I had a User table that contained a CreateUser column. Changing the column name to CreatedBy worked for me.


I've seen weird conflicts like this happen when I've made several changes to the underlying data store and regenerated the model multiple times. Deleting the EF model from my project and recreating it usually fixes it.

0

精彩评论

暂无评论...
验证码 换一张
取 消