entity-framework

Silverlight/xaml - displaying child data in a datagrid

I have two tables in a database and using entity framework and ria services to display data in a simple datagrid. Here is the database/EF structure Cars Make ----- ---- CarId MakeId Car Make MakeId In my Silverlight datagrid I want to show the following two columns, for example Car Make --- ----- Escort ...

How to enable WCF Ria service for ComplexType as reasult from SP?

As learned from Sliverlight forum, WCF ria Service does not support ComplexType, but EF 4.0 supply complextype for results of stored procedure. So if I want to use the results from stored procedure to feed data for datagrid in silverlight client, what's the solution? how to resolve it? ...

How do I navigate a table using the entity framework?

I'm trying to create a simple table navigation screen in WPF using the entity framework on a database with one table, Students. The screen basically has the the students name and surname and back and forwards button. The datacontext is pointing directly to the Students table and is setup as follows: private DBEntities _entity = new DBE...

What is the most annoying feature (or lack of feature) you have found in the Entity Framework?

I am starting with the Entity Framework. It sounds great. But I am wondering if I should watch out for some weakness somewhere. Any experience there? ...

When should I call SaveChanges() when creating 1000's of Entity Framework objects? (like during an import)

I am running an import that will have 1000's of records on each run. Just looking for some confirmation on my assumptions: Which of these makes the most sense: Run SaveChanges() every AddToClassName() call. Run SaveChanges() every n number of AddToClassName() calls. Run SaveChanges() after all of the AddToClassName() calls. The fir...

Can you give an example where entity SQL makes sense?

Linq to entities seems much easier and safer than entity SQL. Can you give an example where using entity SQL makes more sense than Linq to entities? ...

Does entity framework track changes on POCOs

Does the entity framework 4.0 track changes on Plain old C# object? If so, should my class do something special (implement an interface/raise events when changing the value of a property?) Also, how can I get the state(modified/unchanged, etc) of a POCO? Is there a way to know the "old" values of properties? ...

Entity Model 3.5 COMPATIBILITY

Can we use same Entity Model with sql compact file which is generated by sql server database. I need to convert the sqlserver database to sql compact file and need to know if same model can be use in application or we need to generate the model again. Tool: VS 2008 TEAM AND C# ...

Has Entity Framework reached critical mass?

I've been rolling my own object mapping system for over ten years and my current .NET version is pretty stable and I understand it. I've always kept a watchful eye on commercial developments in this area such a Hibernate but I've stuck with what I know. However, I keep hearing more about Entity Framework and wondered whether it's time t...

Creating Data Source for Entity Data Model

I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as a reference: http://dev.mysql.com/doc/refman/5.4/en/connector-net-tutorials-entity-framework-winform-data-source.html However my project is WebApplication instead of WinForms. I have sucessfully created entities, but I am not able to cerate Data Source fo...

Login Failed for User 'NT AUTHORITY/NETWORK SERVICE' when using EntityDataSource with ASP:ListView

Hello All, I have receive the infamous Login Failed for User 'NT AUTHORITY/NETWORK SERVICE' when I try to run a page that contains and EntityDataSource and Listview. Here's Stack Trace: [SqlException (0x80131904): Login failed for user 'NT AUTHORITY\NETWORK SERVICE'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException...

Custom sort-order with SQL-Server and .NET Entity-Framework

Hello! I have a table I store contacts and their phones. Contact: ContactId (int, PK), FirstName (varchar), LastName (varchar) Phone: PhoneId (int, PK), ContactId(int FK), Number (varchar), SortOrder (tinyint) I want that under each contact, the user should be able to maintain the priority of the phones, meaning that the SortOrder co...

DotNetOpenAuth - Database.DataContext.AddToUser(user) does not work

I am incorporating DotNetOpenAuth to my asp.net website. I am new with Entity framework. Database.DataContext.AddToUser(user) located in LogingFrame.aspx.cs does not add a user into the database. User and AuthenticationToken records are filled correctly. The same code from template project, which points to the same database, works fine....

Lambda expression Where on navigation property

Good afternoon, I have three entities (that concern this question) Company (ID, etc..) CompanyAddress (AddressID, CompanyID, Rank) AddressDetails (AddressID, Street, City, State, Zip) The reason Rank and company id aren't in the AddressDetails is because the address detas are shared with contacts via a ContactAddress entity. Anyway, ...

How can I write custom comparison (definition for binary operator Equal) for entityframework object to an int?

I'm getting this error: ex = {"The binary operator Equal is not defined for the types 'MySite.Domain.DomainModel.EntityFramework.NickName' and 'System.Int32'."} What I tried to do was do a select all where the NickNameId = someIntPassedIn... the problem is that the NickNameId is a foreign key, so when it compares the someIntPassedI...

Add/Update a list of entities using the entity framework

I'm returning a List (own class) from Silverlight to a service, in this list there are old entities with updated values and completely new entities, how do I save this back to the database using the entity framework? Using cEnts.CardItems.AddObject gives me duplicates obviously. ...

IsLoaded for self-tracking entities

I'm using self-tracking entities with EF 4.0 and I see that there's no IsLoaded property for navigation objects which participate in a many to many relationship as there is on the standard EF objects. Therefore if you're querying on Person and don't Include Addresses then an empty list comes through for person.Addresses but there's no wa...

how to add new table to existing entity model without losing any customisation to model ?

I want to add a new table in my existing entity data model without using the option update from database. Because in this case i loss existing modification like inheritance and entity names. ...

ADO.NET Entity Framework

I have little bit knowledge on Entity Framework.As we can do almost all operations using MS Application Block,What are the benefits do we gather using Entity Framework ? ...

APIs for ADO.net entity framework

what are the APIs do i need to download in order to make ADO.NET Entity Framework available for my VS 2008 professional edition. ...