locked
change in datacontext RRS feed

  • Question

  • hi,

    i have a project where i use Linq to SQL Classes and datacontext. i had to change the database file and when i pulled the tables again onto a new datacontext the talbes / classes in the designer have all an "s" at the end. eg a table that was named "contract" before is now named "contracs" in the dataclass designer. how can i change this again without manually changing it in the designer. the database table names remained the same.

    thank you.

    Tuesday, December 20, 2011 5:21 PM

Answers

  • is there a setting where i can stop the plurization rules?

    the 1st time i had the mapping done there was no plurarization taking place

    Did you check the link?

    Regards

    • Marked as answer by gigernorthland Wednesday, December 21, 2011 8:24 PM
    Wednesday, December 21, 2011 6:25 PM

All replies

  • Actually, you can't do that, if you change the Database name or Column name in the database server, you will update also the datacontext to be able to corresponds with each other...

     

     

    Wednesday, December 21, 2011 5:26 PM
  • @Jed, actually, you can use whatever name you want, but when auto mapping VS tends to use the same name taking into account plurarization rules and language of VS.

    Regards

    Wednesday, December 21, 2011 5:35 PM
  • is there a setting where i can stop the plurization rules?

    the 1st time i had the mapping done there was no plurarization taking place.

     

     

    Wednesday, December 21, 2011 6:17 PM
  • is there a setting where i can stop the plurization rules?

    the 1st time i had the mapping done there was no plurarization taking place

    Did you check the link?

    Regards

    • Marked as answer by gigernorthland Wednesday, December 21, 2011 8:24 PM
    Wednesday, December 21, 2011 6:25 PM