Friday 15 May 2015

c# - ambiguous reference for foreign key data anotations -



c# - ambiguous reference for foreign key data anotations -

i have class following

public class privilege { [foreignkey("user")] // error line public int? userid { get; set; } .... }

everything fine until alter target framework of project. .net 4.0 , changed 4.5

now there error foreignkey("user") part.

the type 'system.componentmodel.dataannotations.schema.databasegeneratedattribute' exists in both 'c:....\packages\entityframework.6.1.1\lib\net40\entityframework.dll' , 'c:\program files (x86)\reference assemblies\microsoft\framework.netframework\v4.5\system.componentmodel.dataannotations.dll'

how should solve issue?

by way can understand m using entity framework in project , version 6.1.1

c# asp.net entity-framework-6 ambiguous

No comments:

Post a Comment