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

WPF TreeView Binding

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

Logging every data change with Entity Framework

There is a need from a customer to log every data change to a logging table with the actual user who made the modification. The application is using one SQL user to access the database, but we need to log the "real" user id....We can do this in t-sql by w...
entity-framework logging
asked by Biri

How do I apply OrderBy on an IQueryable using a string column name within a generic extension method?

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

How do I get the max ID with Linq to Entity?

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

Using SQL Server 2008 and SQL Server 2005 and date time

I've built a entity framework model against a 2008 database. All works ok against the 2008 database. When I try to update the entity on a 2005 database I get this error. ...The version of SQL Server in use does not support datatype 'datetime2...I speci...
datetime datetime2 entity-framework sql-server-2005 sql-server-2008
asked by Monroecheeseman

TDD and ADO.NET Entity Framework

I've been playing with ADO.NET Entity Framework lately, and I find that it suits my needs for a project I'm developing. I also find cool its non-invasive nature....After generating a data model from an existing database you are faced with the task of inte...
ado.net entity-framework integration-testing tdd unit-testing
asked by Dario Solera

Optimize Group By in LINQ to Entities

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

Unit testing with Entity Framework

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

How do you do a SQL style 'IN' statement in LINQ to Entities (Entity Framework) if Contains isn't supported?

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

Entity Framework Guid

I'm trying to setup the Entity Framework with SQL Server 2008. I'm using Guids for the keys on my tables. Is there a way to set it up so the keys are automatically generated by the database? I tried setting "RowGuid" to true and also set the column's d...
asp.net c# entity-framework
asked by Jake Pearson

Why doesn't Entity Framework support ODBC?

Is there a specific reason that the EF requires new data providers and can't make use of ODBC? I figured it had to be some ORM specific problem, but NHibernate works fine via ODBC....I'm using NHibernate and can continue to use Nhibernate, but I worry th...
ado.net entity-framework nhibernate
asked by anonymous

'Contains()' workaround using Linq to Entities?

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

Linq to Entities / Entity Framework cross edmx "join"

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

Adding to the Where clause of an Update in LinQ-to-Entities

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: Working with detached objects and attached ones

Firstly, let me set out what I'd like to do. Assume I have three types of ...EntityObject..., ...MetaData..., ...Data1... and ...Data2.... ...MetaData... is, as one would expect, has a reference to one instance each of ...Data1... and ...Data2.... Now, fo...
c# entity-framework
asked by biozinc

Databinding ASP.net DropDownList with Entity Framework

I'm trying to bind an ASP.net DropDownList to the results of an entity framework query, while still maintaining multi-tier separation. (i.e. I don't want my UI code to contain query details, nor my Data Layer code to have UI dependencies.) My code-behin...
3-tier asp.net data-binding entity-framework
asked by AndrewCr

Using the entity framework to add existing entities to a collection on a newly created entity

I am using the Entity framework to create a new order. The order contains a collection of contacts, a many to many relationship. I want to add a reference to an existing contact on the order on creation of the order. Both Order and Contact a Entity Obj...
entity-framework many-to-many
asked by kirkmcpherson

How to mock ObjectContext or ObjectQuery<T> in Entity Framework?

How to mock ObjectContext or ObjectQuery in Entity Framework?
.net-3.5 entity-framework mocking unit-testing
asked by saeed

Join and Include in Entity Framework

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 is the best book out there to learn Linq, including 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

Page 2 of 347
  • «
  • 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!