FCI-Helwan blog

Just another FCI-H weblog

Object Relational Designer (O/R Designer)

Today, I’ll talk about another feature in VS2008 beta 2, Object Relational Designer (O/R Designer), briefly for who are used sqlmental.exe LINQ CTP days, this tool replaced it with Designer tool for creating LINQ to SQL (DLINQ) entity classes and associations based on database objects plus mapping database stored procedures and user defined function to Data Context for returning data.

Data Context methods: method call database stored procedures and user defined functions and return sets.

Let’s play with (O/R Designer),

First create project from Console application type

then from VS menu project then add new item and select LINQ to SQL Classes as shown
(O/R Designer) surface will open and that’s time to drag database objects from server explorer (this requires you’ve a connection to database) and drop it on.

Hint: (O\R Designer) works just on SQL Server 2000 and later versions. In my sample I’ve

used pubs database
After dragging all tables and stored procedures, I found that (O\R Designer) has visualized my tables as entity classes and my stored procedure as Data Context methods
Let’s have some code to print all authors’ first names from authors table and execute ByRoylaty stored procedure
And this the result

Advertisements

August 30, 2007 - Posted by | Orcas

4 Comments »

  1. great,
    really a great thing for .net to support ORM frameworks

    is it build on top of LINQ framework or is it a new ORM framework ?

    Comment by م-هويدي | August 31, 2007 | Reply

  2. بس على فكره ، الكلام ده خطيير جدا

    ده معناه إن المبرمج فقط هيصمم الصفحات ( هيبقي ديزينر ) + و هينادي على الدوال في المكان المناسب

    و بكده ميروسوفت عنلت كول حاجه ، كتبت كود الأكسس للداتا بيز و كتبت اللوجيك بتاع البرنامج
    فاضل إيه بقه

    إن لله و إنا إليه راجعون
    لاحول ولال قوة إلا بالله

    Comment by م-هويدي | August 31, 2007 | Reply

  3. It’s built on LINQ.

    They don’t generate Business Logic Layer (BLL), they just do mapping to database objects as I mentioned to entity classes and to SPs and UDFs to Data Context methods.

    It’s not new thing, my GP. (SAT) has these features.

    Yes, they made life easier, any technology should be and do.

    Comment by Ramy Mahrous | September 1, 2007 | Reply

  4. Thanks for your kindly comment

    Comment by م-هويدي | September 10, 2007 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: