I've created a .NET solution with two projects:
ToyData (Visual Basic Class Library)
ToyOne (Visual Basic WPF Application)
The ToyData project contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.
The ToyOne project contains this Window1.xaml.vb file:
1 Imports ToyData
2
3 Class Window1
4
...
I've created a Visual Basic WPF Application project that contains Toy.edmx, an ADO.NET Entity Data Model generated from a database called Toy.
Its Window1.xaml.vb file looks like this:
1 Class Window1
2
3 Private Sub Window1_Loaded( _
4 ByVal sender As System.Object, _
5 ByVal e As System.Windows.RoutedEventArgs...
I am currently looking at different ORM solutions for a project that is planned for this spring. Entity Framework is one of the products I am looking closer at, but EF 2.0 would be quite a lot more interesting.
Has there been any indications to when version 2.0 of Entity Framework is planned to be released? With .Net 4.0?
...
I'd like to use the ADO.NET Entity Framework for data access, extend its objects for my business logic, and bind those objects to controls in my UI.
As explained in the answers to another question, I cannot extend ADO.NET Entity Framework objects with partial classes and use my custom methods in LINQ queries.
I don't want methods sho...
I dont want to include relations in my edmx entity framework, I mean i want to have the foreign key field as a normal property in my entity. how can i do that?
...
Entity Framework has created the required partial classes. I can add these partial classes to the Data Sources window and the properties display as expected. However, if I extend any of the classes in a separate source file these properties do not appear in the Data Sources window even after a build and refresh.
All properties in partia...
I've been reading on the blogosphere for the past week that Linq to SQL is dead [and long live EF and Linq to Entities]. But when I read the overview on MSDN, it appeared to me Linq to Entities generates eSQL just the way Linq to SQL generates SQL queries.
Now, since the underlying implementation (and since SQL Server is not yet an ODB...
Dumb question I'm sure, but why does Entity Framework EntityDataSource object require the where clause to contain 'it' as the first part of the object selector?
The documentation for the where clause (http://msdn.microsoft.com/en-us/library/cc488531.aspx) states that the string is passed directly to the ObjectQuery(T), so I should be ab...
I receive an error message when exposing an ADO.NET Data Service using an Entity Framework data model that contains an entity (called "Case") with an internal setter on a property. If I modify the setter to be public (using the entity designer), the data services works fine.
I don’t need the entity "Case" exposed in the data service, so...
I've heard it said that the Entity Framework is overkill or that it's difficult to learn compared to LinqToSql.
I am wondering in what way? I used LinqToSql and like it. So, I am trying the EF and for the things I'm doing they seem almost exactly the same. Namespaces and method names are different but so far I don't see anything that...
How can i get rid of hard coding in creating a new EntityKey in Entity Framework
...
I've got a Page class in my .edmx ADO.NET Entity Data Model file with with Parent and Children properties. It's for a hierarchy of Pages.
This is handled in my SQL database with a ParentId foreign key in the Page table bound to the Id primary key of that same Page table.
How do I display this hierarchy in a WPF TreeView?
...
I've got a class with Parent and Children properties.
I want to display this hierarchy in a WPF treeview.
Here's my XAML...
<TreeView Margin="12" Name="TreeViewPages" ItemsSource="{Binding}">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
<TextBlock Text="{Binding Path=Sho...
I've got a class with Parent and Children properties.
I want to display this hierarchy in a WPF treeview.
Here's my XAML...
<TreeView Margin="12" Name="TreeViewPages" ItemsSource="{Binding}">
<TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type Page}" ItemsSource="{Binding Children}">
<TextBlock T...
With LINQ to SQL most likely going to not get as much active development as Entity Framework do you think it's best to switch to Entity Framework?
I've personally found EF to be very clunky and hard to use compared to LINQ to SQL which feels very natural.
EDIT: I recently posted an article on my blog about my feelings towards this pote...
I've created an Entity Data Model and imported several stored procedures as Function Imports. I'm exposing the EDM through ADO.NET Data Services (ANDS). Does ANDS automatically expose the functions through its REST API, or do I need to manually add operations to the service?
...
How can i find out from meta data in code that the primary key is an identity in DB in ADO.NET Entity Framework?
...
I'm thinking it would be smart to setup the Entity object context in Application_BeginRequest, store it in Request.items, use it throughout the request and dispose it in Application_EndRequest. That way the context is always available and I can navigate the Entity Framework object graph in my views, lazy loading what I haven't already ea...
If the framework is persistence agnostic, can my unit tests construct a file system version of the persistance store underneath my entity model?
I'll be using the model first features of entity framework in the GUI for sure because it's too easy for my devs to make schema changes and keep DAL layer in sync.
Has anyone tried using the m...
First of all, let's define a few tables:
Users table will store information about a user:
Users
- UserID (int, PK)
- ...
UserTasks is a table that stores a task associated with a user:
UserTasks
- userID (int, FK to Users table)
- taskName (varchar)
When I generate the UserTasks table using the ADO Entity Framework, I'll get a c...