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

In Linq, how do you conduct a basic count?

I wanted to do a paging style table, but NeerDinner example fetches the entire data into a ...PaggingList... type, and I have more than 10 000 rows to be fetched, so I skipped that part....so I come up with this query...var r = (from p in db.Prizes ...
ado.net entity-framework linq linq-to-entities
asked by balexandre

How can I make DbSet.Add() faster?

I have to import about 30k rows from a CSV file to my SQL database, this sadly takes 20 minutes....Troubleshooting with a profiler shows me that ...DbSet.Add is taking the most time, but why?...I have these Entity Framework Code-First classes:...public cl...
c# entity-framework performance sql-server-2008
asked by Tamara Wijsman

Entity Framework vs. Enterprise Library and a few additional general questions

Brief blurb,...My skill in .net has been called "innovative" but I would prefer it be exemplary. Basically, I need a mentor. I own the domain name codeologist.com and I am going to live up to that name but in order to do so I need a mentor & community. ...
agile c#-4.0 enterprise-library entity-framework
asked by jetstreamin

Synonyms for Entity Framework with SQL Server

Hasty research tells me that even EF4 still doesn't support SQL Server synonyms. What are my options for setting up a synonym based entity set as if it were a table based entity set? The crudest I have come up with is to copy the underlying table for th...
entity-framework sql-server synonym
asked by ProfK

Unable to construct a constant variable of type †System.Objectâ€TM in Entity Framework - Linq. There are only primitive kinds.

I have a method to build an expression for a linq query for a given type, property, and value. This works wonderfully as long as the property on the type is NOT nullable. Here is the example I am working from (...http://www.marcuswhitworth.com/2009/12/dyn...
entity-framework expression-trees linq
asked by Shane

With certain cases, the OptimisticConcurrencyException does not operate in Entity Framework.

UPDATE (2010-12-21): Completely rewrote this question based on tests that I've been doing. Also, this used to be a POCO specific question, but it turns out that my question isn't necessarily POCO specific....I'm using Entity Framework and I've got a time...
asp.net c# concurrency entity-framework poco
asked by Johnny Oshika

In Entity Framework, specifying the name of a column for a Referenced Object

I have a pre-defined database that I want to map using Entity Framework 4 CodeFirst....public class Site { public int SiteId { get; set; } public string SiteName { get; set; } public DateTime InstallDate { get; set; } public string Phase {...
.net c# entity-framework
asked by jvanrhyn

Entity Framework Code First has a unique constraint.

Question...Is it possible to define a unique constraint on a property using either the fluent syntax or an attribute? If not, what are the workarounds?...I have a user class with a primary key, but I would like to make sure the email address is also uniqu...
code-first entity-framework unique-constraint
asked by kim3er

To see an attached object as modified, force EF 4.1 code to run first.

All the examples I've found refer to a class called ObjectContext, which doesn't appear to exist in CTP5. I must stress at this point, CTP5 is my first exposure to the Entity Framework....I have a disconnected POCO that I have attached to my DbContext. Sa...
code-first entity-framework
asked by kim3er

Seed technique no longer works in EF4 Code First CTP5

I had EF Code First CTP4 working fine, and I installed CTP5 today. Now, I get an exception when my database is repopulated....Here is my model:...public class Member { public Member() { DateCreated = DateTime.Now; DateUpdated = Da...
c# ef-code-first entity-framework
asked by Dave

EF Code First and SQLite

After my success using SQLite with NHibernate, I am very happy to use it for testing with Entity Framework Code First....If you have some example connections string and set up demos, that would be great and save a bit of time from my hectic day....Thanks ...
code-first entity entity-framework sqlite
asked by nick

Entity-Framework to Update Exception?

Hi,...I am using EntityFramework for my ASP.NET MVC website but have some problems with the update....This is how my update code looka like :...using (BissEntities context = new BissEntities()) { if (adCategoryFilter.Id < 1) context.Add...
.net-4.0 asp.net-mvc c# entity-framework
asked by Banshee

A single Linq-to-Entities query may use many SQL aggregation functions.

In SQL you can express multiple aggregates in a single database query like this:...SELECT MIN(p.x), MAX(p.x), MIN(p.y), MAX(p.y) FROM Places p JOIN Logs l on p.Id = l.PlaceId WHERE l.OwnerId = @OwnerId ...Is it possible to do an equivalent thing using ...
.net entity-framework linq-to-entities
asked by Drew Noakes

Even if there is no NULL value, Entity Framework CTP 4 says "Cannot enter the value NULL into column."

Im using EF CTP 4. I have a simple console app (for testing purposes) that is using EF to insert some data into a SQL database....I have come to a problem where by upon inserting the item ...using(var context = GetContext()) { BOB b = new BOB(); b.I...
c# ctp4 entity-framework
asked by Secret Squirrel

Error 175: The data store provider supplied could not be located.

I'm using VS2010 with the ...MySQL .NET Connector.... My project that used to work started reporting:...Error 175: The specified data store provider cannot be found, or is not valid....I don't know why, though things got weird after a MS recommended hotf...
.net dataprovider entity-framework mysql visual-studio-2010
asked by Walt Stoneburner

what is the difference between entity and entity set names?

I'm using .Net 3.5 with SP1....This may be simple. But, I'm not sure about the difference between entity name and Entity Set Name...Please help me.
entity-framework
asked by gmail user

how to use Code-First to annotate a parent-child connection

When using the CTP 5 of Entity Framework code-first library (as announced ...here...) I'm trying to create a class that maps to a very simple hierarchy table....Here's the SQL that builds the table:...CREATE TABLE [dbo].[People] ( Id uniqueidentifier no...
code-first entity-framework
asked by Ralph Shillington

When DataGridView is attached to a binding source that is linked to an EF4 Entity, how do you sort it?

I have a ...DataGridView... that is linked to a ...BindingSource.......My ...BindingSource... is linked to an ...IQueryable... list of entities:... public void BindTo(IQueryable elements) { BindingSource source = new BindingSource(); ...
c# datagridview entity-framework sorting winforms
asked by Martin

How can I update the ADO.NET Entity Data Model quickly?

I am using ADO.NET Entity Data Model in my C# project. There is an ADO.NET Entity Data Model that is generated on the DB in my project. How do I quickly refresh the ADO.NET Entity Data Model based on DB changes? I have been deleting the model and then cre...
ado.net c# entity-framework sql
asked by Anton

With dependency injection, how do you dispose of resources?

I'm using StructureMap to resolve references to my repository class. My repository interface implements IDisposable, e.g....public interface IMyRepository : IDisposable { SomeClass GetById(int id); } ...An implementation of the interface using Entity Fr...
dependency-injection dispose entity-framework structuremap
asked by Fixer

Page 28 of 347
  • ««
  • «
  • …
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • …
  • »
  • »»

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!