entity-framework

Force subversion not to merge specific files

We are having problems in a project that uses Entity Framework and subversion. Every time someone tries to merge a edmx-file the file is corrupt. We have put a svn:needs-lock property, however this means that no one can edit the file locally. See this post. We need to be able to edit the file locally during development and then apply c...

Entity framework and VARBINARY

I’m using the .NET entity framework and I’ve got one entity containing a varbinary. Is there an easy way to get the size of the varbinary in the codebehind, efter it’s been retrieved from the database? I’m thinking there might be some way to get the size directly from the entity, something like entity.Context.Size – or do one need to ha...

Entity Framework: Conditional foreign key

Hi all, I have the following schema in the database: BillingReferences (ReferencingType tinyint, ReferencingId tinyint, ReferencedType tinyint, ReferencedId tinyint, IsActive bit) - where all fields (except IsActive) are part of a Unique Index. BillingType (BillingTypeId tinyint, Name varchar(50)) ReferencingType and ReferencedType i...

What is the relationship between VS2008 Class Designer and Entity Framework Designer?

I'm learning Entity Framework and have noticed that its Designer looks a lot like the Visual Studio Class Designer but doesn't seem to use it in any way, in fact these seem to be two approaches which solve a similar problem in different ways. Am I missing something here or can these two tools be used together in some way? ...

Does .NET have anything like PropertySet/EntityEngine design?

Hi, Does .net have any propertyset design/architecture? something like: http://www.opensymphony.com/propertyset/usage.jsp Or specifically: http://ofbiz.apache.org/docs/entity.html Is this how the entity framework is or is that different? Does it have an expernal .xml file that has mapping info? ...

Where to find ADO.NET Entity Framework error list?

Where can I find an ADO.NET Entity Framework error list? ...

Entity Framework with XML Files

Can someone point me to a good tutorial explaining the Entity Framework using an XML file instead of a database? I have seen some good tutorials with SQL databases, but I can't make the leap to an XML file. Thanks! ...

entity framework/WCF connection order

Getting some weird behavior in a system. Here's what's up: I have a main which sets up server endpoints using WCF before opening the channels for read/write. I also have an entity-framework based database abstraction layer. When I instantiate my DataBase class, I connect to the DB. One of my endpoints contains this DB abstraction ...

Linq To Entity Framework selecting whole tables

I have the following Linq statement: (from order in Orders.AsEnumerable() join component in Components.AsEnumerable() on order.ORDER_ID equals component.ORDER_ID join detail in Detailss.AsEnumerable() on component.RESULT_ID equals detail.RESULT_ID where orderRestrict.ORDER_MNEMONIC == "MyOrderText" select new { ...

Entity constructors - Entity framework

I'm trying to find the best way to work with objects in entity framework. I don't want my forms to know anything about ObjectContext, so I put all the logic inside the entities (I write partial classes). I've been looking for others experiences a lot and haven't find this approach anywhere. So, how do you work? How do you get an object f...

Entity Framework - Model Defined Functions

I'm new with the Entity Fw. I have a Sql Function that returns the age for a given birthday. (http://www.sql-server-helper.com/functions/get-age.aspx) And I whant to use it with linq. I know it's possible. I've read it here: http://blogs.msdn.com/efdesign/archive/2009/01/07/model-defined-functions.aspx http://blogs.msdn.com/efdesign/a...

Entity Framework vs. AssociateWith

when i use Linq2Sql i can filter a table by using a lambda-expression in the DataLoadOptions.AssociateWith method. i use this for filtering the used language - so i have a language table with all languages and a object table containing objects. like: DataLoadOptions opt = ...; opt.AssociateWith<DB.Objects>(o => o.Language.Where(p => p...

Composite Foreign keys with MS Entity Framework

Hi, I'm trying to create an entity model that involves two tables related. The issue that i'm getting into is that they are related using a composite foreign key. When the model is created, I can't find the relation between both entities. I tryied to create it by hand, but got to the next error: Error 111:The properties referenced ...

What makes The ADO.NET Entity Framework different than other ORM in the market?

The question header is clear, i want to know why its different and why, when to select it for my project? ...

Should 'system data' be in a database?

I have designed a database for an application which contains user settings. This database will come preloaded with several system user settings. These may change from version to version. How should I deal with updating these settings? The solutions I came up with: Apply a boolean 'system' field to the settings tables and replace all s...

Entity Framework - .Include() / .Load()

I have an entity Test. It contains a Navaigation Property Question and Question contains a Navigation Property QuestionLocale. var test = context.Tests .Include("Question") .FirstOrDefault(); works as expected. But how is it possible to include the QuestionLocale? ...

How do I add relational data to an ASP.net MVC data entity Create view?

Let's say I have a table of staff members, and a separate table of staff roles in a many-to-many relationship (ie, with a StaffMembersInRoles table in between). Using the ADO.net entity framework we have an object model like this: I have a StaffController controller with a create method and a Create view which is pretty much the standa...

What is your opinion of the Entity Framework?

I have heard some bad things about the Entity Framework, and I am considering using it. What is your opinion about it? Should I learn it? What are the strong points of it? What are the weak points of it? ...

.NET and database layers

When I last worked in programming, we were trying to move away from DataReaders and the traditional ADO.NET API toward Object Relational Mapping (ORM). To do this, we generated a DataContext of our DB via sqlmetal. There was then a thin data layer that made the DataContext private, and any code needing to access the database would have ...

How to get rid off "An entity object cannot be referenced by multiple instances of IEntityChangeTracker"?

I have a model in Ado.Net EF. I have a one to many relation and when I want to Add the entities I get the error "An entity object cannot be referenceed by multiple instances of IEntityChangeTracker" Any clue? Something similar to Template template = new Template(); ... ... while (from < to) { Course course = new Course(); .....