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)

6940 results

"The underlying supplier failed on Open," says the Entity Framework error.

I have a test. What happens is that whenever test1 is executed first, test2 fails with the message:..."System.Data.EntityException : System.Data.EntityException : the underlying provider failed on open. cannot open database "DBEntities" requ...
.net c# entity-framework
asked by Attilah

Incredibly similar query in Entity Framework

My SQL query against a particular view returns me 3 different rows.... select * from vwSummary where vidate >= '10-15-2010' and vidate <= '10-15-2010' and idno = '0330' order by viDate ...But if i run the same query through my entity framework, I get 3...
c# duplicates entity-framework sql-server-2008
asked by franklins

In entity framework 3.5, you may refresh a stored method.

I am using .NET 3.5 SP1, VS 2008 with the entity framework. I originally added a stored procedure to my model which took 2 parameters. Later, I changed the sproc to just take 1 parameter. I ran the ...Update Model From Database... menu option and confirme...
entity-framework stored-procedures visual-studio-2008
asked by Jeff

First, create an index using entity framework code (CTP5)

Is there a way to get EF CTP5 to create an index when it creates a schema?...Update:... See ...here... for how EF 6.1 handles this (as pointed out by ...juFo... below).
entity-framework
asked by Sean Kearon

Entityframework Join using lambdas and the join method

It seems there are different ways to do joins using linq. One is more straightforward and involves just joining tables like this:...var found = from c in s.categories join cm in s.categorymaps on c.CategoryId equals cm.ChildCategoryId ...
entity-framework join lambda
asked by Mason

In Entity Framework, how do you change an object?

DataContext.ApplyCurrentValues() needs entitySetName, what is it?...I think that code would same:... public void Edit(Products p) { DataContext.ApplyCurrentValues("Products", p); DataContext.SaveChanges(); } ...Is it correct?
ado.net c# entity-framework
asked by FreeVice

Databinding using Entity Framework 4 on WinForms ComboBoxes with Foreign Keys

I am using Entity Framework 4, I need to get WinForms to bind Customers and Quotes as a Master - Detail relationship....I have a Quote table which I lay out as details view on a Windows Form....The quote table has 3 foreign keys to the customer table. (fi...
c# combobox entity-framework foreign-keys
asked by Andrew Roberts

Creating a new DbEntityEntry or mocking or simulating a DbEntityEntry

Following on the heels of my other ...question about mocking DbContext.Set... I've got another question about mocking EF Code First....I now have a method for my update that looks like:...if (entity == null) throw new ArgumentNullException("entity"); ...
ef-code-first entity-framework
asked by taylonr

Property StoreGeneratedPattern="Computed" in Entity Framework

I have a ...DateTime... property. I need this property's default value to be ...DateTime.Now.... And then I found out that you can specify an attribute ...StoreGeneratedPattern="Computed"... and set it to ...(getdate())... in SQL. This works successfully....
ado.net-entity-data-model c# entity-framework sql-server-2005
asked by ebattulga

Creating an interface using Entity Framework

I want to use IoC with Entity framework and Ninject. I figure I need the Generated Entity classes to implement an interface, ICRUD. There's a ...walkthrough... that shows how to force Entity framework to implement an interface. I followed the direction...
asp.net-mvc-3 c# entity-framework ninject
asked by P.Brian.Mackey

Code First Memory Usage in ASP.NET MVC and EF

I have an application built in ASP.NET MVC 3 that uses SQL CE for storage and EF CTP 5 for data access....I've deployed this site to a shared host only to find that it is constantly being recycled as it's hitting the 100mb limit they set on their (dedicat...
asp.net-mvc entity-framework performance
asked by Ben Foster

"CategoryCategoryID" is an incorrect column name in the EF Code.

There is a existing database named Northwind with a webform application. when running the application raise up a error: 'invalid column name CategoryCategoryID'. any one help me?. thanks in advance!!...Category.cs:...public class Category { public in...
ef-code-first entity-framework
asked by user441222

In an Asp.Net MVC 3 application, how can I collect complicated child objects?

I want to be able to update a model and all its collections of child objects in the same view. I have been referred to these examples: ...http://haacked.com/archive/2008/10/23/model-binding-to-a-list.aspx... and ...http://blog.stevensanderson.com/2010/01/...
asp.net asp.net-mvc-3 collections entity entity-framework
asked by Anders

Entity to Linq AcceptAllChanges SaveChanges

What is the difference between the following:... db.AcceptAllChanges(); // vs db.SaveChanges(); db.AddToCustomer() // vs db.Customers.AddObject(Mycustomer); ...and why there is ...db.Customers.DeleteObject(M...
c# entity entity-framework
asked by Stacker

Nullable Types and Expression Trees

I've been playing around with Expression Trees. I have the following simple method that performs a query by dynamically creating an Expression Tree. ItemType is a nullable int in the database, ...and also in the EF entity class.... For some reason thou...
c# entity-framework expression-trees
asked by Adam Rackis

In Expression Trees, why is a conversion required?

From ...this question... I asked 5 minutes ago, it's clear that the following code throws an exception, stating that ...Unhandled Exception: System.InvalidOperationException: The binary operator Equal is not defined for the types 'System.Nullable`...
c# entity-framework expression-trees
asked by Adam Rackis

Using arguments to call a stored procedure

I have a stored procedure that returns a value, not a dataset, and I have problems getting it to work with EF4....I've seen this: ...http://dotnet.dzone.com/news/how-retrieve-stored-procedure...Here is what I did: I added a procedure to the model, and imp...
c# entity-framework
asked by katit

WPF MVVM modeling using Entity Framework CTP5 Code First

I have my model all setup for my WPF application and working with entity framework ctp5 code first, here's a sample model class:...public class Task { public int ID { get; set; } public int Index { get; set; } public string Content { get; set;...
code-first ef-code-first entity-framework mvvm wpf
asked by Chris Klepeis

In the next Entity Framework, choose N+1.

One of the few valid complaints I hear about EF4 vis-a-vis NHibernate is that EF4 is poor at handling lazily loaded collections. For example, on a lazily-loaded collection, if I say:...if (MyAccount.Orders.Count() > 0) ; ...EF will pull the whole collect...
entity-framework
asked by Adam Rackis

Join two tables using LINQ to Entities, then group and total the columns from each tables.

As the title says, my goal is to JOIN two tables (target and transaction) on several columns, then group the result of that join and sum the values of columns from BOTH tables. The following query only allows access to columns from the FIRST table in the ...
c# entity-framework linq linq-to-entities
asked by Daniel Coffman

Page 32 of 347
  • ««
  • «
  • …
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • …
  • »
  • »»

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!