Browse by Tags
All Tags »
ADO.NET (
RSS)
Building Data Access Layers with Entity Framework Slide Deck Today I had an Entity Framework session (“Building Data Access Layers with Entity Framework”) session at Microsoft Ra’anana. I want to thank all the attendees who came to hear the session. You were a great audience. In the session I Introduced EF. Explained the EDM concept. Explained how to query the database using EF. Explained how to make data manipulation using EF. Talked about EF4 and the major features it brought to the framework....
Adding Metadata to Entities in The Data Model Sometimes I’m being asked how to add metadata to a generated entity in Entity Framework. This metadata can be data annotation or other attributes which can help the developer during runtime. One answer that I give is to edit the T4 template in order to add the attributes. This solution can be combined with the building of an extension to Entity Framework designer which can add more details to the EDM. But it can take some time to develop. Another solution...
Entity Framework 4 Session Lately I wasn’t blogging or working because of a very annoying virus. I’m feeling better now so don’t worry I’ll return blogging gradually. I also wanted to tell you about an open house I’m having at Microsoft about Entity Framework 4 . The session will take place at Microsoft ’s office at Ra’anana in Monday 24 of January. In the session I’m going to introduce Entity Framework and then what’s new in Entity Framework 4 . For more details and for registration you can go to...
EF Feature CTP5: Inheritance Scenarios with Code First Fluent API One of the interesting features of Code First fluent API is the ability to configure inheritance in your model. Since one of the strengths of an O/RM solution is its ability to map inheritance then this feature is a must in every mapping scenario (may it be Model first , Database First or Code First ). In this post I’ll show how to configure inheritance by using the fluent API. Revisiting Entity Framework Inheritance Types In the past...
Using EF DbContext with WCF Data Services One of the questions that you may ask yourself with the new EF feature CTP5 is how to embed the new DbContext object inside an OData service or more particularly inside WCF Data Service . This post will supply the solution. DbContext as WCF Data Service Data Source Entity Framework has a good integration with WCF Data Services . All you need to do when you create a WCF Data Service with EF is to put the generated ObjectContext as a data source of the service...
EF Feature CTP5: Raw SQL Query/Command Support One of the new features that EF feature CTP5 supplies is the support for raw SQL Query/Command through the DbContext . In this post I’m going to show you examples for how you can use this feature. Pay attention that the details I provide might change in the future since its only a CTP and not a release. DbContext Raw SQL Query/Command Support EF feature CTP5 supports the execution of raw SQL queries and commands through the DbContext . This behavior...
Building N-Tier Applications Using Entity Framework 4 Session Recording The recordings from the Teched were published yesterday. If you want to see my session about Building N-Tier Applications Using Entity Framework 4 ( in Hebrew ) you can go to this link . Enjoy! CodeProject
EF Feature CTP5 – Code First Fluent API One of Code First main features is the Fluent API . This API can help you to configure the model in order to shape it (and the database) better. In this post I’m going to show a simple example for how to use the Fluent API . Pay attention that the details I provide might change in the future since its only a CTP and not a release. The Example Model In the example I’m going to use the following model: public class SchoolEntities : DbContext { #region Properties...
EF Feature CTP5 – Walkthrough For The New DbContext T4 Template One of the new features in the EF Feature CTP5 that was released yesterday was a new T4 template for generating DbContext instead of ObjectContext . In this post I’m going to explain what is the new DbContext and then show how to use the new T4 template . Pay attention that the details I provide might change in the future since its only a CTP and not a release. What is DbContext? The DbContext is a new lightweight context that was created...
Entity Framework Feature CTP5 Released Yesterday, ADO.Net team released the EF feature CTP5 . The feature CTP contains new features for Entity Framework that are planed to be shipped as a stand alone package in the first quarter of 2011. The main feature in the package is Code First which allows you to define your model using C# or VB.Net classes only. This approach will be added to the previous EF approaches: Model First and Database First to form a better framework for common data access development...
How to Separate Self-Tracking Entities to Their Own Class Library Last week I had a session in Teched Israel 2010 which included approaches for building N-Tier applications on top of Entity Framework 4 as the data access technology. During the session I showed an example of how to use the new Self-Tracking Entities ( STE ) feature. In this post I‘m going to show how easy it is to put the STE in a different class library as a jump start for using this T4 Template in N-Tier scenarios. What is Self...
Building N-Tier Applications with Entity Framework 4 Slide Deck I just finished my session in Teched Israel 2010. The subject was building N-Tier applications with Entity Framework . I want to thank all the attendees who joined me at this morning after yesterday’s party. The subjects that I covered are how to build N-Tier applications on top of Entity Framework in three different approaches – Self-Tracking Entities, Data Transfer Objects and POCO. If you are interested you can download the slide...
Back to Basics – Null-Coalescing Operator Yesterday during an EF4 course that I’m giving at a customer I showed an example for a property that is set using the null-coalescing operator . Since some of the students asked me what is this operator, I gave a small explanation and thought that it’s something that I can share here in the blog. So here it goes… Null-Coalescing Operator The null-coalescing operator or ?? can be very useful when you want to check nullity of a reference type or nullable types...
My Teched Session (or Why I’m Not Blogging Lately) If you are a reader of my blog probably you have noticed that I didn’t write posts for a while. The reason is obvious… I’m getting ready for my Teched session. My coming session isn’t going to be an introduction to Entity Framework . This time I’m going to talk about considerations and approaches for building N-Tier applications with Entity Framework . I wrote a teaser Hebrew article about the subject which was published in Newsgeek and you can read...
Exposing a Stored Procedure in WCF Data Service Today I answered a question in the data platform development forums. The question was simple – how to expose a stored procedure which is mapped to an Entity Framework model through a WCF Data Service . This post will show you exactly how to do this. The Stored Procedure First I’ve created a the following stored procedure: CREATE PROCEDURE dbo.GetCoursesOrderByTitle AS BEGIN SET NOCOUNT ON SELECT CourseID, Title, Days, [ Time ], Location, Credits, DepartmentID...
More Posts
« Previous page -
Next page »