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)

839 results in tag: linq

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

Building where clauses to evaluate collections inside a many to many connection using LINQ to entities

So, I am using the Linq entity framework. I have 2 entities: ...Content... and ...Tag.... They are in a many-to-many relationship with one another. ...Content... can have many ...Tags... and ...Tag... can have many ...Contents.... So I am trying to write ...
c# entity-framework lambda linq many-to-many
asked by Phobis

What are some alternatives to expanding in a LINQ to ADO.net Data Service query?

I am wondering if there are any alternatives to using the Expand key word when performing an LINQ to ADO.net Data Services query. The expand method does get me the data I am interested in, but it requires me to know all of the sub-objects that I am going...
entity-framework lazy-loading linq wcf-data-services
asked by ChrisHDog

What is the best way to create a Linq Expression Tree that compares to a generic object?

I have an IQueryable and an object of type T....I want to do IQueryable().Where(o => o.GetProperty(fieldName) == objectOfTypeT.GetProperty(fieldName))...so ......public IQueryable<T> DoWork<T>(string fieldName) where T : EntityObject { ... T...
c# entity-framework expression-trees generics linq
asked by JTew

How can I utilize LINQ to Entities with a WPF TreeView HierarchicalDataTemplate?

I've got a Page class in my .edmx ADO.NET Entity Data Model file with with Parent and Children properties. It's for a hierarchy of Pages....removed dead ImageShack link - ADO.NET Entity Framework Hierarchical Page Class...This is handled in my SQL databa...
data-binding entity-framework linq wpf xaml
asked by Zack Peterson

TreeView Binding in WPF

I've got a class with Parent and Children properties....ADO.NET Entity Framework Hierarchical Page Class http://img148.imageshack.us/img148/6802/edmxxe8.gif...I want to display this hierarchy in a WPF treeview....Here's my XAML......<TreeView Margin="12" ...
.net data-binding entity-framework linq wpf
asked by Zack Peterson

Within a generic extension method, how do I apply OrderBy to an IQueryable using a string column name?

public static IQueryable<TResult> ApplySortFilter<T, TResult>(this IQueryable<T> query, string columnName) where T : EntityObject { var param = Expression.Parameter(typeof(T), "o"); var body = Expression.PropertyOrField(param,columnName); var sor...
.net c# entity-framework expression-trees linq
asked by JTew

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

Entity Framework unit testing

I want to test my Entities that are built using Entity Framework. My concern is that using Entity Framework means directly working with data source. So any ideas how to unit testing Entity Framework based components?
entity-framework linq unit-testing
asked by Muhammad Soliman

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

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

Entity Framework Join and Include

I have the following query of linq to entities. The problem is that it doesn't seem to load the "Tags" relation even though i have included a thing for it. It works fine if i do not join on tags but i need to do that.... var items = from i in d...
.net c# entity-framework linq sql
asked by Olaj

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

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

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

Include() function of Linq-to-Entities is not loading

If I use a join, the Include() method is no longer working, eg:...from e in dc.Entities.Include("Properties") join i in dc.Items on e.ID equals i.Member.ID where (i.Collection.ID == collectionID) select e ...e.Properties... is not loaded...Without the jo...
entity-framework linq
asked by Lee Atkinson

In LINQ to Entities, creating a context

I've seen two different manners that programmers approach when creating an entity context in their code....The first is like such, and you can find it all over the MSDN code examples:...public void DoSomething() { using (TaxableEducationEntities cont...
entity entity-framework linq linq-to-entities
asked by Jagd

LINQ to Entities bulk deletion

Is there any way to bulk-delete a bunch of objects matching a given query in LINQ or LINQ-to-Entities? The only references that I can find are outdated, and it seems silly to iterate over and manually delete all objects I wish to remove.
c# database entity-framework linq linq-to-entities
asked by Benjamin Pollack

Page 1 of 42
  • 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!