none
dbml designer bug RRS feed

  • Question

  • LinqToSQL dbml designer property box doesn't have any option to change connection mode to "WebSettings". Only option available is to use "AppSettings". Even if I change the mode to "WebSettings" by changing the XML, designer will change it back to "AppSettings" everytime you make changes to any of the existing objects or when you drop a new object from server explorer
    • Moved by lucy-liuModerator Tuesday, October 11, 2011 9:20 AM it is related to linq to sql (From:Visual Studio Editor)
    Monday, October 10, 2011 1:05 PM

Answers

  • What I found out is, the problem is that visual studio only makes WebSettings available in designer, if the dbml is added to a web project. If it is a project of any type other than Web, you have appsettings as the possible value.

    It is absurd, as it should let you choose both types irrespective of the project type and the final config value should be picked based on the final deployment of the dll. Because either dll will be executed in a web app or windows app. So instead of calling it AppSettings or Websetting, it should just be settings.

    • Marked as answer by Yatish Ram Tuesday, February 12, 2013 3:37 PM
    Tuesday, February 12, 2013 3:37 PM

All replies

  • Hi Yatish,

    I am moving this thread from “Visual Studio Editor" forum to the “LINQ to SQL” forum. Since the issue is related to LINQ to SQL. There are more experts in the “LINQ to SQL" forum.

    Thank you for your understanding!

     

    Best regards,

    Lucy


    Lucy Liu [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.

    Tuesday, October 11, 2011 9:20 AM
    Moderator
  • LinqToSQL gives you the functionality, the option is missing from Visual studio. And I know how to get around it manually, but its is bug with the IDE. So I don't see a reason why it should be moved from Visual studio forum.

    Tuesday, October 11, 2011 10:20 AM
  • The problem is that when you update the model it recreates the code from the dbml file which is a xml file, you can edit it to reflect whatever option you like as long as it is consistent with your model.  It will stay that way whenever the editor refreshes the model.

    Regards

    Tuesday, October 11, 2011 7:28 PM
  • Hi,

    I think you can try add "LINQ to SQL" item in your Web Application, you will find the "WebSettings" in your XML.

    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.

    Sunday, October 16, 2011 5:04 AM
    Moderator
  • I know what I can do by making changes to XML, but that is not the questions. The question is whatever I can do by making changes to markup, why there is no option of doing the same from UI. Another bigger question is why designer keep on changing the connection string to what it likes.

    It does't work like this in any other designer in visual studio, it is a bug with visual studio. I was just asking, may be I didn't know how to do it, but now I am certain it's bug.

    Thursday, October 20, 2011 3:18 PM
  • What I found out is, the problem is that visual studio only makes WebSettings available in designer, if the dbml is added to a web project. If it is a project of any type other than Web, you have appsettings as the possible value.

    It is absurd, as it should let you choose both types irrespective of the project type and the final config value should be picked based on the final deployment of the dll. Because either dll will be executed in a web app or windows app. So instead of calling it AppSettings or Websetting, it should just be settings.

    • Marked as answer by Yatish Ram Tuesday, February 12, 2013 3:37 PM
    Tuesday, February 12, 2013 3:37 PM