1

I have a problem in that I can't add a synonym to the LINQ to SQL designer in Visual Studio, even though in the properties, it knows that the base object is a stored procedure.

Basically, I need use synonyms in order to not have to use any stored procedures because I have 2 databases in 2 different server locations.

usr
  • 168,620
  • 35
  • 240
  • 369
Benjamin RD
  • 11,516
  • 14
  • 87
  • 157

1 Answers1

1

Add the procedures directly using the designer. Edit their properties using the Properties Window to point to the synonym instead. Or, edit the DBML file to do that.

usr
  • 168,620
  • 35
  • 240
  • 369
  • I was just reading: http://stackoverflow.com/questions/352949/linq-across-multiple-databases#answer-353106 But I'm not sure if the queries are `SQL` queries or how you can access to the objects – Benjamin RD Nov 28 '14 at 16:10
  • I've been doing what the linked answer suggests. I also have found a way to change the database name at runtime by modifying L2S internal data structures using Reflection. Nasty. – usr Nov 28 '14 at 16:19
  • I think that use Stored Proceadures it's the better option, now it's working. – Benjamin RD Nov 28 '14 at 16:24