zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

25 results in tag: entity-framework-6.1

How are people unit testing with Entity Framework 6, should you bother?

I am just starting out with Unit testings and TDD in general. I have dabbled before but now I am determined to add it to my workflow and write better software....I asked a question yesterday that kind of included this, but it seems to be a question on its...
c# entity-framework entity-framework-6 unit-testing
asked by Modika

Generating a SQL view from EF 6.1 code first

I just changed my application from Database first to code first! What a great improvement in deploying!. But now i have the following problem. I generated my Code-first model from my database, but after recreating the database from the generated code, my ...
c# entity-framework entity-framework-6.1
asked by Spons

How can you add a navigation property on a view in EF 6.1 CodeFirst

Let's make a case to explain my problem. ...MyTable1...+id...+myTable2Id...MyTable2...+id...MyView1...+id...+myTable2Id...MyView1 exists in the case, from data from the MyTable1. Now i want to create a Navigation property from my EF6.1 Code first approach...
c# entity-framework entity-framework-6 entity-framework-6.1 navigation-properties
asked by Spons

Entity Framework -- caching an object in memory across multiple contexts

I am using Entity Framework 6 with a tenant-segregated application. I determine the tenant by looking at the request host name, then use it throughout the application, set it in tenant-owned records, et cetera....Every context gets disposed at the end of...
c# entity-framework entity-framework-6 entity-framework-6.1 sql
asked by Casey

Entity Framework 6.1 Updating a Subset of a Record

I have a view model that encapsulates only ...some... of the database model properties. These properties contained by the view model are the only properties I want to update. I want the other properties to preserve their value. ...During my research I fo...
c# entity-framework entity-framework-6.1
asked by Caster Troy

Upgraded EF5 to EF 6 and now get "Cannot find the object because it does not exist or you do not have permissions."

I've got a main web application project using a referenced class library that uses EF code first. In the main web application I've also got several .edmx files. This is a production app with real data using automatic migrations (MigrateDatabaseToLatestVer...
asp.net-mvc c# entity-framework entity-framework-6 entity-framework-6.1
asked by SventoryMang

When executing a command, parameters must be exclusively database parameters or values

I am not able to retrieve the ouput value back. I get the following exception:...Execption Type: InvalidOperationException:...When executing a command, parameters must be exclusively database parameters or values....C# Code Method...public Student Insert...
c# entity-framework entity-framework-6 entity-framework-6.1 stored-procedures
asked by Ernie R.

Foreach loop through table seems to load every row and run out of memory

I am trying to dump a database table using the Entity Framework in C# using EF Version 6.1.1. I was expecting the foreach loop to load each row one at a time but it gradually loads every row and then runs out of memory....foreach (Quote L in context.Quote...
entity-framework entity-framework-6 entity-framework-6.1
asked by Mythlandia

Entity Framework 6: is there a way to iterate through a table without holding each row in memory

I would like to be able to iterate through every row in an entity table without holding every row in memory. This is a read only operation and every row can be discarded after being processed. ...If there is a way to discard the row after processing that ...
entity-framework entity-framework-6 entity-framework-6.1
asked by Mythlandia

Entity Framework Code-First - Define the Non-clustered key for this EntityType

I Have defined an entity class with a key, but I don,t want that key be cluster because I have another cluster index in my entity, but I received an error when I add an Index attribute to my model,...Can anybody tell me that how can I define a ...Non-Clus...
ef-code-first entity-framework entity-framework-6 entity-framework-6.1
asked by Mahdi Khalili

Entity Framework 6 where did key and column attributes go

I'm upgrading from Entity Framework 4.1.0.0 to Entity Framework 6 and I'm having a really hard time tracking where all of the old classes went and what namespace things are in these days....I've got a class that looks like this and was using these attribu...
c# ef-code-first entity-framework entity-framework-6 entity-framework-6.1
asked by Josh R

Removing code first migration and degrade to older state

I have multiple DBContext so I created multiple Code first Migration folders. I just created another DBContext and related table in the code. I also added migration folder and applied in database as InitialSetup. Now I realize that I don't need new cha...
ef-migrations entity-framework entity-framework-6.1
asked by Nps

Unable to update Foreign Key in Entity Framework 6

I am trying to do a simple update to the foreign key but the script never get sent over....Here is the code I am using:...using (var db = new MyContext()) { db.Entry<Contact>(newContact).State = EntityState.Modified; newContact.ContactOwner = ...
c# entity-framework entity-framework-6.1 foreign-keys
asked by foo0110

The specified type member 'UsersCount' is not supported in LINQ to Entities

I have such POCO entity... public class Product : Entity { [DatabaseGenerated(DatabaseGeneratedOption.None)] public int Id { get; set; } [Required] [MaxLength(50)] public string Name { get; set; } ...
asp.net-mvc entity-framework entity-framework-6.1 linq-to-entities
asked by Tomas

EntityFramework Stored Proc Function Import is it possible to read async?

I'm using EF 6.1.1 and Database First. When I import a stored proc into the edmx and generate the DBContext it looks like this:...return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<TestSP_Result>("TestSP", params[]...) ...That returns an O...
asynchronous c# entity-framework entity-framework-6 entity-framework-6.1
asked by oscarmorasu

SetExecutionStrategy to SqlAzureExecutionStrategy with DbMigrationsConfiguration?

I saw a post today about implementing SqlAzureExecutionStrategy:...http://romiller.com/tag/sqlazureexecutionstrategy/...However, all examples I can find of this use a Configuration that inherits from DbConfiguration. My project is using EF6 Code First Mi...
azure-sql-database ef-migrations entity-framework entity-framework-6.1
asked by James in Indy

Entity Framework Include related table when table is empty

I'm reading data from database to gridview's datasource. My Table2 can be empty. When I try to bind columns from Table2 gives me error that doesn't contain that column. I checked the data that was coming from query. There is Table2 but not columns. Just C...
.net c# entity-framework entity-framework-6 entity-framework-6.1
asked by TurKorsaN

How to totally lock a row in Entity Framework

I am working with a situation where we are dealing with money transactions....For example, I have a table of users wallets, with their balance in that row....UserId; Wallet Id; Balance ...Now in our website and web services, every time a certain transacti...
c# entity-framework entity-framework-6.1 rowlocking sql-server
asked by Zapnologica

Migration to MySQL and Schema specified is not valid

I have migrated SQL2012 Database to MySQL, apart from one issue....I get the following error when I connect to the MySQL Database....An exception occurred while initializing the database. ...InnerException for details: Schema specified is not valid. Erro...
entity-framework entity-framework-6 entity-framework-6.1 mysql
asked by RentUrApp

Adding Inner Join to DbScanExpression in Entity Framework Interceptor

I'm trying to use an Entity Framework CommandTree interceptor to add a filter to every query via a DbContext....For the sake of simplicity, I have two tables, one called "User" with two columns ("UserId" and "EmailAddress") and another called "TenantUser"...
c# entity-framework entity-framework-6 entity-framework-6.1
asked by Mark Johnson

Page 1 of 2
  • 1
  • 2
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!