none
How to change a DBML

    Question

  • I'm using VS2010. I have a WCF service that uses a DBML file containing two tables and it works just fine.  I see it has RTT.dbml, RTT.dbml.layout, and RTT.designer.cs files.  I added a table to the dbml by dragging it from server explorer and rebuilt the project but the table I added, TTNew, isn't recognized as an object.  Hmmmm...

    So I then deleted the whole dbml file and recreated it with the three tables I need and built the project.  Now I see there is no RTT.Designer.cs file!  Also just the TTNew table is not recognized.

    There must be something else I have to do but, What is it?

    Thanks, Dean


    .net Developer
    Sunday, February 05, 2012 12:11 AM

Answers

All replies

  • Hi Dean,

    Welcome!

    I think you can try to create a new project and just drop TTNew table to dbml file to see if it works. Here is a link for changes the DBML:

    http://social.msdn.microsoft.com/Forums/en-US/linqprojectgeneral/thread/c9f0e3e8-8c62-4faa-b962-bccc4315c5ab/

    If there is still the question, would you please share your database schema with me?  thanks for understanding.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, February 06, 2012 7:22 AM
    Moderator
  • Alan:

    I created a new project with a DBML including all three tables and that compiled ok.  I then deleted the DBML files from my live project and replaced them with the three DBML files from the new project and rebuilt the project.  Now, even though the TTNew table is indeed defined in the DBML files, it is not recognized in my Service.cs code but the other two tables are.

    The link you gave me is 5 years old and addressing VS2008.  I had already found that. 

    The real problem here is that this is due to bugs in Visual Studio.  LINQ to SQL is just one of many technologies that Microsoft pushed to developers and then dropped as soon as it was adopted.  Everybody knows this doesn't work.  I suppose the recco from MS would be to rewrite my project to use LINQ to Entities because MS hasn't dropped that technology yet.  After MS drops that they will recco I rewrite in HTML5 and JavaScript.  After they drop that they will ...  never mind.

    I think I'm hosed.

    Dean


    .net Developer

    Wednesday, February 08, 2012 4:54 PM
  • Hi Dean,

    Thanks for your feedback.

    I'm not sure about your Service.cs file(class), you should add reference to this class. Here is a old link here:

    http://www.sidarok.com/web/blog/content/2008/05/26/linq-to-sql-with-wcf-in-a-multi-tiered-action-part-1.html

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, February 09, 2012 8:59 AM
    Moderator
  • Hi,

    I am writing to check the status of the issue on your side. Would you mind letting us know the result of the suggestions?
    If you need further assistance, please feel free to let me know. I will be more than happy to be of assistance.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, February 15, 2012 8:21 AM
    Moderator