locked
Is there any plans to support DataAnnotations? RRS feed

Answers

  • Hi Mike,
       Do you mean DataAnnotations on the client types we generate ? 
       I understand that this might be really useful for writing Silverlight applications , are there any specific scenarios you are interested in ?
     
    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Friday, December 18, 2009 3:50 PM
    Moderator

All replies

  • Hi Mike,
       Do you mean DataAnnotations on the client types we generate ? 
       I understand that this might be really useful for writing Silverlight applications , are there any specific scenarios you are interested in ?
     
    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Friday, December 18, 2009 3:50 PM
    Moderator
  • Hi Mike

    I'm also interrested on this feature. The idea behind:

    What I did until now:
    1. Created a MS SQL 2005 database with needed tables and relations
    2. Created an edmx file wich contains my database structure and navigation properties
    3. Used 'partial' statement to add some metadata information to my model (DefaultValue, Unit, ColumnOrder and so on)
    4. Hosted all these information together on a dynamic data web site

    Overall and at the end a working solution...

    But now I want to change my layout to:
    1. Use my existing MS SQL 2005 database structure
    2. Use my existing edmx files
    3. Use my existing metadata information
    4. Put 2. and 3. together to a dll.
    5. Host these classes via an ADO.Net Data Service, with the ability to switch data service from SQL Server to SQL CE database file
    6. Consume this newly created data service on my existing dynamic data site

    Point 1. -4. works fine.
    Point 5. with SQL server works fine. With SQL CE file the new $inlinecount features from ADO.Net dataservices V1.5 won't work.
    Point 6. When consuming the newly created dataservice on dynamic data site the client side generated classes are missing the whole metadata information, which are defined on my dll. I have no idea, how to decorate my dataservice entities, which inherit from System.Data.Services.Client.DataServiceContext with my metadata informations defined on my dll and are of type ObjectContext?!


    The basic idea behind this confusing layout. I want to use the same dynamic data site within our domain and on standalone pc's, which are not connected to our SQL Server. Therefore I want to sync data from SQL Server to SQL CE file. On my dataservice I want to switch between SQL Server (Domain) and SQL CE file (standalone PC on customer side). Data service code should be the same, of course.


    Are there any working examples you could provide? I hope my problem is clear, and my english not too bad.

    Thanks a lot
    Sebastian
     
    Tuesday, February 23, 2010 9:26 AM