Updatable Views in Entity Framework 5/6

I would think that your easiest method, would be to change the definition of your EntitySet in your StorageModel to tell it to regard it as a table, as opposed to a database-view. Looking at the XML definition, where it says <EntitySet Name=”Products” store:Type=”Views” .. you change that to <EntitySet Name=”Products” store:Type=”Tables” .. (Note the … Read more

Can’t auto-generate IDENTITY with AddRange in Entity Framework

What was causing the problem? Enumerables! Take a look at the EDIT section in my question for the solution. EDIT: posting the updated code here as answer. The problem was in the way I used enumerables. Bottom line is you should never trust lazy loading when you need consistent results right away. public class Request … Read more

Could not load file or assembly ‘System.Memory, Version=4.0.1.’ in Visual Studio 2015

If this error is appearing in an IIS app such as ASP.NET, then there is a high probability that you are missing a binding redirect in the web.config. When you install from Nuget, you should see a binding redirect in the web.config. If you deploy the application to another machine but fail to set up … Read more

Configure multiple database Entity Framework 6

It’s not important that how many DbContexts you have(In entity framework 6). Just put connection strings in appConfig or webConfig of startup project. Then you’re ready to go. Example of appConfig with two connectionString with Ef 6.01 & Sql Compact 4.0 <configSections> <section name=”entityFramework” type=”System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089″ requirePermission=”false” /> </configSections> <connectionStrings> <add name=”MainDb” … Read more

How can I get a PDB file for the EntityFramework NuGet package?

Now with pictures (as it took me about an hour of trial and fail) Get DotPeek from Jetbrains (Standalone version) Open DotPeek -> File -> Open -> browse to your project bin folder and open EntityFramework.dll Right mouse button on EntityFramework then choose Generate Pdb… Go to folder where you exported it and open EntityFramework.pdb … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)