locked
How can one get Linq to include extended property information from Sql Server 2005 RRS feed

  • Question

  • User-1614457691 posted

    All --

    Please help.

    How can one get Linq to include extended property information from Sql Server 2005, like this...

    Viewing Extended Properties

    http://msdn.microsoft.com/en-us/library/ms186989(SQL.90).aspx

    ...so that the goal is to have that information in the Linq model itself for fast consumtion by Dynamic Data constructs, rather than having to read it from the database on-demand.

    Thoughts? Ideas? Suggestions?

    (Yes, I do have some reservations about pushing that raw data far away in the database, rather than keeping it close in the business-layer itself. However, I may opt for using the Sql Server "Description" extended property information regardless. Given that I must always deploy non-updatable pre-compiled and given that I use the Hugati DbmlTool to sync my Linq model and the database which is virtually a touchless sync, there seems to be little reason for avoiding SQL storage of the raw data. Maybe. I am just now trying to see if it can be done and how. If you think this is a particularly bad idea, then I respect that and want to hear your reasons.)

    Thank you.

    -- Mark Kamoski

    Tuesday, August 26, 2008 9:21 AM

Answers

  • User2050624116 posted

    In addition to the xml documentation I presume you would also want that information included as attributes [for programmatic access]?

    Right-O. That is exactly what I want to do.

    (BTW, for all those who have not found it-- the Hugati DbmlTool really works and saves a lot of time-- if you are using Linq, you should consider it strongly.)

    Thank you.

    -- Mark Kamoski

    Hi Mark,

    The latest version of the add-in (released today) has a new 'documentation' feature that will retrieve the description attribute from SQL 2005/SQL 2008 extended properties along with index information from the database. It then updates the xml comment documentation as well as add the System.ComponentModel.DescriptionAttribute to the relevant classes and properties.

    This first version of the documentation feature is a little bit slow (albeit a lot faster than typing in the documentation by hand) and only has two options (controlling whether to use extended properties, and/or indexes). Optimizations to make it faster along with more user options will come in a future update.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 1, 2008 7:45 AM

All replies

  • User2050624116 posted

    Hi Mark,

     

    That's a very interesting idea.

    I'm working on a documentation feature in the Huagati DBML Tools add-in that will update the xml documentation summary field for entity classes and member properties. Currently it uses remarks from a text field in the upcoming dbml explorer (early screenshot: http://blog.huagati.com/res/wp-content/uploads/2008/08/dbmlExplorerPreview2.png ) but I will make a couple of tests to see if I can fit in retrieving descriptions from extended properties into the same.

    In addition to the xml documentation I presume you would also want that information included as attributes [for programmatic access], e.g. System.ComponentModel.Description..?

     

    Best regards,

    Kristofer

    Tuesday, August 26, 2008 11:27 AM
  • User-1614457691 posted

    In addition to the xml documentation I presume you would also want that information included as attributes [for programmatic access]?

    Right-O. That is exactly what I want to do.

    (BTW, for all those who have not found it-- the Hugati DbmlTool really works and saves a lot of time-- if you are using Linq, you should consider it strongly.)

    Thank you.

    -- Mark Kamoski

    Tuesday, August 26, 2008 11:35 AM
  • User2050624116 posted

    In addition to the xml documentation I presume you would also want that information included as attributes [for programmatic access]?

    Right-O. That is exactly what I want to do.

    (BTW, for all those who have not found it-- the Hugati DbmlTool really works and saves a lot of time-- if you are using Linq, you should consider it strongly.)

    Thank you.

    -- Mark Kamoski

    Hi Mark,

    The latest version of the add-in (released today) has a new 'documentation' feature that will retrieve the description attribute from SQL 2005/SQL 2008 extended properties along with index information from the database. It then updates the xml comment documentation as well as add the System.ComponentModel.DescriptionAttribute to the relevant classes and properties.

    This first version of the documentation feature is a little bit slow (albeit a lot faster than typing in the documentation by hand) and only has two options (controlling whether to use extended properties, and/or indexes). Optimizations to make it faster along with more user options will come in a future update.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 1, 2008 7:45 AM
  • User-1614457691 posted

    ...The latest version of the add-in (released today) has a new 'documentation' feature that will retrieve the description attribute from SQL 2005/SQL 2008 extended properties along with index information from the database. It then updates the xml comment documentation as well as add the System.ComponentModel.DescriptionAttribute to the relevant classes and properties....

    Kristofer --

    That is nice work.

    I got the update today and works great.

    Thank you VERY much-- it is a real time-saver for our team.

    -- Mark Kamoski

     

    Wednesday, September 3, 2008 5:34 AM