EDIT: I have submitted a bug report and Microsoft have acknowledge that it is a bug. There is currently no ETA on when it will be fixed.
Bug Report: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=386982
Official Feedback: http://social.msdn.microsoft.com/Forums/en-US/vswpfdesigner/thread/ca3cac55-c1de...
I am looking for some guideline for my new application while choosing ORM. I want to evaluate EF over NHibernate and LINQ to SQL. I need some expert voice from this wonderful community.
You can evaluate on following point.
Scalability
Learning curve
Easy to use
Performance
ETC.
...
I am using Entity Framework with my website. To improve performance, I have started to use compiled queries wherever I can, either directly with CompiledQuery.Compile or using ESQL.
The performance now is fantastic, that's it, once the queries are compiled. Compiling them takes quite a bit of time on some pages apparently, so the first...
I have an entity class that has a property with an underlying db column of datatype Int, however in reality I want this property to be an Enum. Is there any way to specify that this property returns an Enum?
...
I have two related classes which share a common interface and are both stored in the same underlying database table. However, the Entity Framework generates one common class, where I really need the two distinct classes. How do I resolve this? Is it best to use a base class rather than an interface? How do I change the EF model to provid...
i know its a new thing , more powerful and a lot more options added to it,
but is linq2sql is part of the new EF ?
if not , what is the main different between the two frameworks?
...
I am using the new ADO.NET Entity Data Model on a simple database. I have a table/entity with a primary key (PageID) and a ParentID foreign key that references back to itself on PageID for a parent/child "0..1 to many" relationship. On a ASP.Net page, I'm using a FormView with a asp:DynamicControl to express this as a control. That p...
I have following table structure:
Table: Plant
PlantID: Primary Key
PlantName: String
Table: Party
PartyID: Primary Key
PartyName: String
PlantID: link to Plant table
Table: Customer
PartyID: Primary Key, link to Party
CustomerCode: String
I'd like to have Customer entity object with following fields:
PartyID: Primary Key
...
Please if you have used NHibernate and Entity Frameworks, please contrast your experiences.
...
I have found many posts and examples of using LINQ-syntax in Delphi Prism (Oxygene), but I have never found anything on LINQ to SQL or Entity Framework.
Is it possible to use LINQ to SQL or Entity Framework together with Prism? Where can I found such an example?
Update:
Olaf is giving an answer through his blog
The question is now if...
Hi erverybody,
i've got this tables in my database.
With Entity Framework i would like to have something like that:
I've used table-per-hierarchy inheritance, so i added a new entity for the premium user and map it to the user entity with conditions to IsPremiumUser property. I would like to have the PremiumAccount table associate...
I have a table called BlogPost which has a 1-to-many relationship with the Comment table. (In Comment, there's a foreign key BlogPostId.)
Now I want to retrieve all posts as well as the latest comments of each post. I've tried with s/t like below but it doesn't work.
from r in Db.BlogPost
select new {Post = r, LatestComment = r.C...
I know many:many isn't supported in Linq2Sql but I am working on a workaround
I am working with my little SO clone and I have a table with Questions and a table with Tags and a linking table QuestionTag so I have a classic many:many relationship between Questions and Tags.
To display the list of Questions on the front page I have this...
Say I want to design a database for a community site with blogs, photos, forums etc., one way to do this is to single out the concept of a "post", as a blog entry, a blog comment, a photo, a photo comment, a forum post all can be thought as a post. So, I could potentially have one table named Post [PostID, PostType, Title, Body .... ], ...
I'm using ADO.NET EF in an MVC application. I'm considering putting the ObjectContext inside HttpContext.Current so that all logic in the same request can access to it without having to open/destroy each time. However, I'm really sure if it's a good way to manage ObjectContext instances. I have 2 questions regarding this need:
As Ht...
I've created a function import that returns the results of a stored proceedure as one of my entities. however I can't seem to traverse my through navigation properties to access the data in other entities. I know that you can use include() for objectQueries but can't find anything that will force the EF to load my relations for entity re...
Given the following database table hierarchy:
Region
------
RegionId
RegionName
Country
-------
CountryId
RegionId
CountryName
Destination
-----------
DestinationId
CountryId
DestinationName
Venue
-----
VenueId
DestinationId
VenueName
I have the following Entity Framework query:
var result = from region in context.Region.Include("...
I have a Tags table whose schema consists of only ID and Name (unique). Now, from the GUI user can enter tags for a BlogPost. When the data is saved, with tags stored in an array of string (names), I want to add tags whose names don't yet exist to the Tag table and ignore tags whose names already exist AND get back the list of all tag...
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 like this:
List<long?> txnIds = new List<long?>();
// Fill list
var q = from t in ...
I have an entity that exposes a collection of children of the same type. The entity can itself be a child of another instance - in effect a many-to-many relationship with itself. In the database I have a linker table with two columns - parentId and childId - both of which reference the Id column in my entity table. Entity Framework corre...