Questions for entity-framework


9447

Show progress bar when Entity Framework transfer data

I have a project that uses data from Entity Framework and present them in WPF. I want show threaded progress bar when Entity Framework load/save data on presentation layer.
3158

How to control JSON.NET serialization of System.Data.Spatial.DbGeometry

I have a DB First Entity Framework 5 Data Access Layer that is mapped to a table containing a SQL geometry type field called CenterCoordinate. The resulting entity contains this:
6368

Calculated Columns in the Entity Framework?

I've not yet got much experience with ORM's, and on my last ASP.NET Web Forms site, a friend created a mapping file (for nHibernate) which contained a couple of calculated columns. These 2 columns ...
3369

EF Fluent API map 0..1 to 0..1 relationship

Hi guys I have a question about EF Fluent API (Code First :P). In my model I have
3983

Entity Framework - ObjectContext.DeleteObject() when related entities are orphaned

I have two entities in a many to one relationship. Widget (1) <--> (*) Users.
5560

Does Serializable transactions only lock out other transactionscope statements? or everything?

In a transaction i have the following, MyEntities is my context:
9108

Entity Framework is Too Slow. What are my options?

I have followed the "Don't Optimize Prematurely" mantra and coded up my WCF Service using Entity Framework.
4646

Entity Framework SQL Server increments an Id Key out of order if previous values are available

I have an MVC4 website and it has a SQL Server DB that contains its posts. On each post there is a Next and Previous button. These buttons are calculated from databaseContext.Post.Count() plus or m...
8078

.NET MVC4, Entity, Search

I have an MVC4 project using EF. I have set up my schema so that all searchable items have have a Table that relates them to a "Tags" table. I am wondering what is the most efficient way to do a full
9185

order by and distinct in entity framework

The following event handler is returning it's list but it is not distinct. There are still many duplicates in the list.Any thoughts?
9658

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)
5006

Entity Framework Code First and Classes that Implement IList<T>

I have a ComplexType that must implement IList&lt;T&gt; (background info here).
4372

Model Tracking In Entity Framework

We were using Microsoft WCF Web Services and Entity Framework ORM in our project.
9752

Location of EntityFramework T4 templates

When you do database-first or model-first (EDMX) in EntityFramework, I believe Visual Studio generates code off T4 templates, I would like to create a new out of the default and throw some customiz...
4479

Intercepting and logging changes with EF 4.2 code first

I spent some time reading a few posts and articles about audit tracking but still can't figure this out.
3962

When Selecting Multiple Values in Listbox getting exception Index was outside the bounds of the array in Linq to Entity

I have a multiple values in ListBox. When I am Selecting a Single Value my code is working fine.
8197

Options to display fields from different databases in WPF DataGrid?

I am using .Net 4.0 framework, C#, WPF, EF 4 and FireBird.
5436

Implementing Repository pattern and doing Tests

I have read almost all articles about Repository pattern and different implementations of it. Many of them judged bad practices (ex: using IQueryable&lt;T&gt; instead of IList&lt;T&gt;) etc. that w...
3136

Write an insert or update and auditing Entity changes?How can I do it?

When insert/updating an entity I need to log all the properties that have changed.
5640

Trouble writing predicates to search a repository with Entity Framework (equivalent to using a Join in SQL)

We are using code first Entity Framework 4.1 to persist data. Some of our entities have a relationship like this:
5922

relationship one to one EntityFramework error

I create 2 table in sql server 2008
8946

how to add condition in object declaration ? EF -

I would like to do something like this (below)... I don't want to full write out template.title = xxx, template.descrption =xxx etc.
9531

How to get foreign key value for independent association without hitting database?

I am using independent associations (with lazy loading) to access related entities in my code first model e.g.
9337

When does a Gridview have a null DataSource?

I've read multiple sources that say Gridview's do not persist the Gridview.DataSource property on postback. My understanding is that in term's of ASP.NET, a postback is any page load that is not the
8284

Newbie: How to execute MyData.edmx.sql

I've created a simple Entity Framework model-first app in VS 2012 by creating an MVC 4 project and adding a single data entity using the designer.
8784

Entity Framework trying to save empty string as null in database

I'm having to work with a database table, that for whatever reason, requires all entries to have a value(NOT NULL). Not all entries are relevant to the user and they will be leaving entries blank w...
4208

entity framework cache refresh

Is there an equivalent to this Rails brilliance for clearing a DB query cache in Entity Framework (any version)? I keep having this problem and can't seem to find an easy way to solve it:
5128

SQL Anywhere, Entity Framework 4 and Transactions

I have a process in my program that uses an Entity Framework 4 EDM. The entity context object contains function imports for calling stored procedures.
2644

EF + UnitOfWork + SharePoint RunWithElevatedPrivileges

In our SharePoint application we have used the UnitOfWork + Repository patterns together with Entity Framework. To avoid the usage of the passthrough authentication we have developed a piece of cod...
4744

Entity Framework Code First - Two tables, same concept, but different types

I have a database with two tables, one with a column numeric (19,4) and other with float.
667

Multiple ResultSet in EntityFramework

I am using Entity Framework 4 for one of my projects. I am looking for the solution to reduce the database calls by returning multiple resultset. How can i achieve this using Entity Framework.
9928

Add a Linq clause to a Iqueryable object

I have a method who get a Iqueryable object get from a LINQ Query
6578

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 t...
2661

entity framework nested select queries

I have a SQL query and I should use it in Entity Framework. I'm new in Entity and I don't know how I can do that. My query is:
4830

Import data from other DB with other properties names

So I got 2 databases, 1 SQLite file, which is updated every week (so I ll need to run this update once a week). And a SQLserver (but now using SQLfile just for localtesting etc). However I am looki...
3581

EF4 Code-First causes InvalidOperationException

I'm having an issue when trying to run my project each time it builds. It seems the initializer runs, but when it comes to the first query - it dies with the following InvalidOperationException.
7011

Is it possible to retrieve SQL error codes from unsuccessful entity framework data operations?

SQL returns codes that are preceded by a minus sign (-) indicate that the SQL statement execution was unsuccessful. (All SQL defined error codes are negative integers).
5718

Joining asp_Users db tables in LINQ using asp.net MVC

I am working on an example asp.net project using MVC, but my database is a live one which I can't make changes to (technically it's the test version of this database but my point is changes to the
9663

entity framework 4.0 with STEs: how to delete a many to may relationship without delete registers

I have a many to many relationships in my dataBase, so I have three tables, TableA, TableB and TableAB. TableAB only has the primary key of the tableA and the primary key of the tableB.
8183

Entity framework trouble

I need to setup a one-to-many relationship with entity framework.
4168

Issues with relationships using pocos in entity framework

I have an application where I use POCO classes and I'm getting an error when I try to set a relationship between a new object and a persisted object.
7032

EF builds EntityCollection, but I (think I) want IQueryable

I have an entity A with a simple navigation property B. For any given instance of A, we expect several related thousand instances of B.
283

Entity Framework POCO entity template : format property names

properties in the database are all in small case and use underscore for word separation. E.g.:
4438

Change Schema of Entity Framework

I'm using Entity Framework 5 on ASP MVC 4 web site I'm developing.
4626

Entity Framework References, Multi Layer App

I have set up my MVC app with seperate Class Libraries for my Domain (POCOs) and Repositories. Now my DbConxet is currently in the domain layer and i wanted to add the following:
616

My Entity won't cast to IEntityWithRelationships

I am having trouble casting one of my entities to IEntityWithRelationsships. I am using a lot the method for getting context from an entity, and it's been working fine so far. I thought that entity...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.