Sign in
Meta-Me
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
Astoria
C#
Code Only
Community
Data Services
DSP
EDM
EF
EF 4.0
EF Internals
Entity Framework
Expressions
Foreign Keys
Functional
IDataServiceQueryProvider
LINQ
LINQ to Entities
Metadata
Object Services
OData
Philosophical
Ramblings
Samples
Tips
Tricks
Archive
Archives
May 2013
(1)
December 2012
(2)
November 2012
(1)
August 2012
(2)
February 2012
(1)
June 2011
(2)
June 2010
(3)
March 2010
(2)
February 2010
(5)
January 2010
(10)
December 2009
(3)
November 2009
(9)
October 2009
(4)
September 2009
(3)
August 2009
(5)
July 2009
(8)
June 2009
(8)
May 2009
(9)
April 2009
(9)
March 2009
(10)
February 2009
(3)
January 2009
(7)
December 2008
(3)
November 2008
(2)
September 2008
(2)
July 2008
(1)
June 2008
(1)
May 2008
(7)
April 2008
(2)
March 2008
(3)
February 2008
(8)
January 2008
(2)
December 2007
(2)
November 2007
(11)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Meta-Me
Tip 9 – How to delete an object without retrieving it
Posted
over 4 years ago
by
Alex D James
16
Comments
Problem The most common way to delete an Entity in the Entity Framework is to pull the Entity you want to delete into the context and then delete it like this: // Find a category by ID by // TRIVIA: in .NET 4.0 you can use .Single() // which will throw...
Meta-Me
Tip 8 - How to write 'WHERE IN' style queries using LINQ to Entities
Posted
over 4 years ago
by
Alex D James
28
Comments
Imagine if you have a table of People and you want to retrieve only those whose the Firstname is in a list of interesting firstnames. This is trivial in SQL, you write something like this: SELECT * FROM People WHERE Firstname IN ('Alex', 'Colin', ...
Meta-Me
Tips and Tricks
Posted
over 4 years ago
by
Alex D James
25
Comments
Hopefully if you're reading this you've noticed that I've started a series of Tips recently. The tips will mostly apply to Entity Framework or Data Services. Seeing as I expect to have a lots of tips, it probably makes sense to have some sort of...
Meta-Me
Tip 7 - How to fake Foreign Key Properties in .NET 3.5 SP1
Posted
over 4 years ago
by
Alex D James
22
Comments
Background If you've been reading the EF Design Blog you will have seen that we recently announced something called " FK Associations " for the EF in .NET 4.0. However in .NET 3.5 SP1, we only support Independent Associations. What that means is that...
Meta-Me
Self-Tracking Entities
Posted
over 4 years ago
by
Alex D James
1
Comments
Some of the feedback we got on the EF design blog about our early N-Tier plans , highlighted that lots of people just want the whole "tier thing" to just work out of the box. Fortunately now that we have adopted T4 to generate our entities we have...
Meta-Me
Tip 6 - How and when to use eager loading
Posted
over 4 years ago
by
Alex D James
5
Comments
When should you use eager loading? Usually in your application you know what you are going to "do" with an entity once you have retrieved it. For example if you retrieve an order so you can re-print it for a customer, you know that the re-print would...
Meta-Me
Tip 5 - How to restrict the types returned from an EF Query.
Posted
over 4 years ago
by
Alex D James
9
Comments
Imagine you have a model that looks like this: How do you query for just Cars? This is where OfType<SubType>() comes in. You write something like this: var onlyCars = from car in ctx.Vehicles.OfType< Car >() select car; And...
Meta-Me
Tip 4 - Conceptual Schema Definition Language Rules
Posted
over 4 years ago
by
Alex D James
2
Comments
The first version of the Entity Framework was released a while back ago now with .NET 3.5 SP1. One of the most glaring holes in the Entity Framework documentation was the lack of a formal document describing the Conceptual Schema Definition Language...
Meta-Me
Tip 3 - How to get started with T4
Posted
over 4 years ago
by
Alex D James
11
Comments
So if you've been reading the Entity Framework Design Blog you will have heard us talk about T4 . It is a technology that ships with Visual Studio 2008 (and 2005 as a separate download). In .NET 4.0 the Entity Framework is leverage T4 to help with...
Meta-Me
Alt.NET Seattle
Posted
over 4 years ago
by
Alex D James
1
Comments
I went to Alt.NET Seattle on the weekend. Being from the Entity Framework team, I was a little nervous about how I'd be received. Well I definitely shouldn't have worried... everyone was very civil. In the broader sense I wasn't sure what to expect...
Page 1 of 1 (10 items)