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)

274 results in tag: linq-to-entities

Expression. How do I invoke Entity Framework?

The Entity Framework does not support the ...Expression.Invoke... operator. You receive the following exception when trying to use it:..."The LINQ expression node type 'Invoke' is not supported in LINQ to Entities....Has anyone got a workaround for this ...
.net entity-framework linq linq-to-entities
asked by Brad Leach

Linq to Entities vs. ESQL Performance

When using the Entity Framework, does ESQL perform better than Linq to Entities?...I'd prefer to use Linq to Entities (mainly because of the strong-type checking), but some of my other team members are citing performance as a reason to use ESQL. I would l...
entity-framework entity-sql linq-to-entities
asked by Brad Leach

With Linq to Entity, how do I obtain the maximum ID?

I have a table User which has an identity column ...UserID..., now what is the correct Linq to Entity line of code that would return me the max ...UserID...?...I've tried:...using (MyDBEntities db = new MyDBEntities()) { var User = db.Users.Last(); ...
c# entity-framework linq linq-to-entities
asked by Ray

Group Optimization In LINQ to Entities, by

I have this query in LINQ to Entities.... var query = (from s in db.ForumStatsSet where s.LogDate >= date1 && s.LogDate <= date2 group s by new { s.Topic.topicID, s.Topic.subject, s.Topic.Forum.forumName, s...
entity-framework linq linq-to-entities sql
asked by Olaj

If Contains isn't supported, how can you make a SQL-style 'IN' query in LINQ to Entities (Entity Framework)?

I'm using LINQ to Entities (not LINQ to SQL) and I'm having trouble creating an 'IN' style query. Here is my query at the moment:...var items = db.InventoryItem .Include("Kind") .Include("PropertyValues") ....
c# entity-framework linq linq-to-entities
asked by JC Grubbs

Using Linq to Entities as a workaround for 'Contains()'?

I'm trying to create a query which uses a list of ids in the where clause, using the Silverlight ADO.Net Data Services client api (and therefore Linq To Entities). Does anyone know of a workaround to Contains not being supported?...I want to do something ...
.net-3.5 c# entity-framework linq linq-to-entities
asked by James Bloomer

Cross edmx "join" between Linq to Entities and Entity Framework

I have two entities, each from a different database and therefore different edmx files. There is, however, an infered relationship between them....Foo... has many ...Bar...s for example....What's the easiest way to do this join in the EntityFramework, wit...
entity-framework linq-to-entities
asked by NikolaiDante

In LinQ-to-Entities, adding to the Where clause of an Update

Let's say I have a table called Product, with three columns: Id, CustomerId, Name. Id is the primary key. The schema is outside of the control of my group, and we now have a requirement to always provide CustomerId as a parameter for all queries (selects...
entity-framework linq linq-to-entities sql
asked by Joel Martinez

Which book is the best for learning Linq, especially Linq to Entities?

I heard lots of reviews on the book Linq in Action, but it does not cover Linq to Entities. ... Please provide your feedback on the books you may have read.
.net-3.5 c# entity-framework linq linq-to-entities
asked by Binoj Antony

The object could not be destroyed because it did not exist in the ObjectStateManager.

Trying to get a handle on Entity Framework here and I am hitting some speed bumps... I have a Get() method that works fine and has been tested, but my Delete method is not working:... public static void Delete(string name) { J1Entities db = ...
c# entity-framework linq-to-entities
asked by naspinski

Is it possible to export the.edmx diagram from Visual Studio 2008 to Visio?

Some people want to see the DB structure and dont have VS, is there a way to do this? Or any other way to export it outside of a screencapture (it is a huge diagram)....Thank you.
entity-framework linq-to-entities visio
asked by naspinski

How can I remove an object from an Entity Framework model without having to load it first?

I am quite sure I've seen the answer to this question somewhere, but as I couldn't find it with a couple of searches on SO or google, I ask it again anyway......In Entity Framework, the only way to delete a data object seems to be ...MyEntityModel ent = n...
asp.net-mvc entity-framework linq-to-entities
asked by Tomas Aschan

How do you use Linq to ADO.NET entity framework to do full text search (FTS)?

Now that SQL Server 2008 has full text search built in. I'm looking to use it to power my website's search. I'm also looking at using ADO.NET entity framework for my ORM but I was wondering how do you do full text search (FTS) with Linq to ADO.NET entity ...
c# entity-framework full-text-search linq-to-entities sql-server-2008
asked by ajma

For subtracting two dates, use LINQ to Entities.

I am trying to determine the number of days between 2 dates using LINQ with Entity Framework. It is telling me that it does not recognize Subtract on the System.TimeSpan class...Here is my where portion of the LINQ query....where ((DateTime.Now.Subtract(v...
datetime entity-framework linq-to-entities
asked by Michael I

To pick an anonymous type, establish a LINQ Expression Tree.

I would like to generate the following select statement dynamically using expression trees:...var v = from c in Countries where c.City == "London" select new {c.Name, c.Population}; ...I have worked out how to generate...var v = from c in ...
c# entity-framework expression-trees linq linq-to-entities
asked by Tom Deloford

Random order of LINQ to Entities

How do i return matching entities in a random order?... Just to be clear this is Entity Framework stuff and LINQ to Entities....(air code)...IEnumerable<MyEntity> results = from en in context.MyEntity where en.type == myTyp...
c# entity-framework linq-to-entities
asked by NikolaiDante

Why does it take 30 seconds for Entity Framework to load data while the resulting query only takes 1/2 second?

The executeTime below is 30 seconds the first time, and 25 seconds the next time I execute the same set of code. When watching in SQL Profiler, I immediately see a login, then it just sits there for about 30 seconds. Then as soon as the select statement...
.net c# entity-framework linq-to-entities
asked by NotDan

Updating your edmx to reflect database changes (.net linq-to-entities)

So I have my edmx made. ...Then I change my database a little bit, changing a column to from being a NOT NULL to allowing NULL....I go into my edmx, right click and choose "Update Model from Database"...Now I go into my program and it hasnt actually upda...
.net-3.5 entity-framework linq linq-to-entities
asked by Stuck In Baghdad

What is the best way to connect an Entity Framework object that isn't a database object?

I have a complete separation of my Entity Framework objects and my POCO objects, I just translate them back and forth......i.e:...// poco public class Author { public Guid Id { get; set; } public string UserName { get; set; } } ...and then I have an...
.net-3.5 c# entity-framework linq-to-entities
asked by sontek

Many-to-Many Query Problems with Entity Framework - Linq To Entities

I am having problems querying many-to-many relationships in Linq To Entities. I am basically trying to replicate this query using Linq:...Select * FROM Customer LEFT JOIN CustomerInterest ON Customer.CustomerID = CustomerInterest.CustomerID LEFT JOIN In...
entity-framework left-join linq-to-entities many-to-many
asked by JD.

Page 1 of 14
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • …
  • »
  • »»

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!