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)

24 results in tag: objectcontext

How do you update the ObjectContext cache from the database?

We are loading data from db:...var somethings = Context.SomethingSet.ToList(); ...Then someone deletes or adds rows outside of context. Out context still has caches deleted object, because it doesn't know they were deleted. Even if I call Context.Somethin...
.net c# entity-framework objectcontext
asked by LukLed

In an ASP.NET Session object, what is the Entity Framework Object Context?

We have a multi-layered Asp.NET Web Forms application. The data layer has a class called ...DataAccess... which impements ...IDisposable... and has an instance of our Entity Framework Object Context as a private field. The class has a number of public met...
asp.net entity-framework httpcontext objectcontext session
asked by andrej351

Entity Framework - database object refresh

I'm having trouble with refreshing objects in my database. I have an two PC's and two applications....On the first PC, there's an application which communicates with my database and adds some data to Measurements table. On my other PC, there's an applicat...
database entity-framework objectcontext wpf
asked by Nebojsa Veron

Mocking ObjectContext in EF4 for unit testing?

Can it be done without using TypeMock Islolator? I've found a few suggestions online such as passing in a metadata only connection string, however nothing I've come across besides TypeMock seems to truly allow for a mock ObjectContext that can be injected...
entity-framework mocking objectcontext typemock
asked by Steve Macdonald

Entity Framework adds a new object to the ObjectContext in C#.

im working with Entity Framework, SQL and C#....i have a Table called Client and other called clients_phone....I have a form with a Xtragrid and using BindingSource I bind the IQueryable to the grid....myBindingSource = new BindingSource(); myBindingSourc...
c# devexpress entity-framework objectcontext xtragrid
asked by Mark Comix

AcceptChanges is unable to proceed because the object's key values contradict with those of another object in the ObjectStateManager.

I've been stuck with this problem for over a week now. Hopefully some one can point me in the right direction....I start with a brief description of my schema....Asset 1--->1 Address *-->1 Area *-->1 Region *-->1 Country...Package 1-->* Asset...Using Self...
entity-framework objectcontext self-tracking-entities wcf
asked by Tri Q Tran

In EF 4.1, how can I foreach through my dbcontext entities?

I'm using ASP.NET Entity Framework 4.1 MVC 3 (C#)...I want to foreach through all the entities in my DbContext. I need to be able to dynamically refer to my entities in order to make dynamic views....I have read Lerman's book, two MVC (2 & 3) books, msdn,...
asp.net-mvc-3 dbcontext entity-framework objectcontext objectstatemanager
asked by Benjamin

Dbcontext executes StoreQuery

I want to use ...ExecuteStoreQuery... function of Entity Framework and I was wondered that my context variable didn't have ...ExecuteStoreQuery... method....So, I discovered that it's a method of ...ObjectContext... class, but I've already used ...DbConte...
c# dbcontext entity-framework linq objectcontext
asked by Chuck Norris

When mapping database tables using ADO.NET Entity datamodel, why does Entity Framework utilize the ObjectContext instead of the DbContext?

I am following the database approach first; I have created the tables in my SQL Server 2008 database, then I map those tables to Entity Framework classes using an ADO.NET Entity Data Model. But when I opened the designer.cs file I found the following code...
asp.net asp.net-mvc-3 dbcontext entity-framework objectcontext
asked by john Gu

Entity Framework's ObjectContext vs. DbContext

I'm using the ...DbContext... class within code that I am creating that is based on the Generic Repositories and Unit of Work design patterns. (I am following the guidance ...here....) While working on this project I have encountered the ...ObjectContext....
.net dbcontext entity-framework objectcontext
asked by afr0

In a multi-threaded server, c# and Entity Framework are used.

What is the best practice for working with entity framework in a multi threaded server? I'm using entity framework ...ObjectContext... to manage all my database actions, now I know this context isn't thread safe, so for now when I need to use it to perfor...
c# database entity-framework multithreading objectcontext
asked by Eyal

DbSet, EntityFramework 4, and ObjectContext

few days ago i read tutorial about GenericRepository and Unit Of Work patterns ...http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application.... I use web forms an...
entity-framework objectcontext
asked by geek

sql query with entity framework

How can I use sql query, in sql language, if I used entity framework to make the connection? I understood from this ...post... that ObjectContext.ExecuteStoreQuery won't help because it works only with some queries (not 1:1 to sql language). ...The other ...
ado.net entity-framework linq-to-sql objectcontext sql
asked by BornToCode

Entity framework remove object from context, but not from database

I am working on a batch process which dumps ~800,000 records from a slow legacy database (1.4-2ms per record fetch time...it adds up) into MySQL which can perform a little faster. To optimize this, I have been loading all of the MySQL records into memory ...
c# entity-framework memory-management objectcontext out-of-memory
asked by Los Frijoles

Provider connection string from Entity Framework

If you are using object contex data model (with EDMX file), during its creation you might want to specify the connection string inside your config file. ...The connection string is unfortunately not the common connection string as it contains some ...thin...
c# edmx entity-framework objectcontext
asked by Mirek

How do I stop Entity Framework from generating BOTH ObjectContext and dbContext

Background...Visual Studio 2012...NEW Model.EDMX file created in VS2012...Copied some of the EDMX xml from a previously created EDMX into the new one...Problem / Question...Now. The EDMX (TT transform, custom tool, whatever, etc.) is generating BOTH DbCo...
dbcontext entity-framework objectcontext
asked by Jay Stevens

How to add entity-framework to console application (images are included)

I try to add entity-framework to console application: I press "add new item" and ...then ...then...then I added code:... class Program { static void Main(string[] args) { try { Database1Enti...
asp.net c# database entity-framework objectcontext
asked by Paul T.

How to delete a list of object using ObjectContext?

Say you have code like this ....using (CustomerContext db = new CustomerContext()) { var foundCustList=db.Customers.Where(c=>c.State=='-1').ToList();//Find all the customer which State is -1 foreach(var c in foundCustList) { db.DeleteObjec...
entity-framework objectcontext
asked by Joe.wang

Entity Framework - Where is my Object Context?

Ok, I'm obviously missing something very basic. I'm very new to Entity Framework....I want to call stored procedures without importing them, so I was planning on using ExecuteStoreQuery(). According to the documentation, ExecuteStoreQuery is a method of...
entity-framework objectcontext
asked by JoeMjr2

Get DBContext from ObjectContext

I'm using the latest versions of ASP.NET MVC, SQL Server, and Entity Framework. I am ...not... using code first....I can easily create an object context using the class generated by my EDMX file....But is there any way to obtain a ...DBContext... object f...
dbcontext entity-framework objectcontext
asked by Jonathan Wood

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!