Error - The best overloaded method match for 'System.Data.Entity.Core.Objects.ObjectContext.ExecuteFunction(string, params System.Data.Entity.Core.Objects.ObjectParameter[])' has some invalid arguments.
Solution :
Solution :
The problem is that your model don't know anything about new parameters. I guess that it happens when your model using EntityFramework (EF) lower version (5.0 for example), but in code you are trying to use EF 6.0.
So, you should either downgrade your code to EF 5.0, or upgrade your model to 6.0.
Upgrading model:
So, you should either downgrade your code to EF 5.0, or upgrade your model to 6.0.
Upgrading model:
- Open Tools -> NuGet Package Manager -> Package Manager Console;
- Choose project, that contains your model as Default project on the top of Console.
- Type "Uninstall-Package EntityFramework" and press Enter;
- After removing, type "Install-Package EntityFramework -version 6.0.0" and press Enter again;
- Go to YourModelName.Context.cs and YourModelName.Context.tt and replace "using System.Data.Objects; using System.Data.Objects.DataClasses;" with "using System.Data.Entity.Core.Objects;". Also, you may need to make the same in all files, where this problem appears.
Done :)
perfect...
ReplyDeletethx