3 Replies - 6016 Views - Last Post: 28 December 2012 - 12:41 PM Rate Topic: -----

#1 zankana  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-December 12

Using Linq to SQL in a webservice

Posted 26 December 2012 - 09:04 AM

I have two existing linq to sql .dbml files that i need to have added to an existing web service. When i pulled them in, it said references where missing. I didn't think that this was a big deal and went to add them. I can't seem to add the ones i need too. When i went to see if i could just create a new .dbml file to get all the proper references, it does not seem to be an option to include with our web service solution. When i search for it and add it that way, it will add but it fails to add any referances because it gets stuck at System.Core. I've came across others using linq to sql with their web services but i cannot seem to find how to get it to work with what i have. These also seem to be mostly in an older version of visual studio. I am using Visual Studio 2010 Professional. I searched this site and a few others trying to figure out how to make this work and haven't found anything yet.

Is This A Good Question/Topic? 0
  • +

Replies To: Using Linq to SQL in a webservice

#2 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4577
  • View blog
  • Posts: 8,019
  • Joined: 08-June 10

Re: Using Linq to SQL in a webservice

Posted 28 December 2012 - 09:40 AM

Your issue is probably that your existing web service isn't built against a version of the .NET Framework that supports LINQ to SQL. If your web service is .NET 2.0, it won't work.
Was This Post Helpful? 0
  • +
  • -

#3 zankana  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-December 12

Re: Using Linq to SQL in a webservice

Posted 28 December 2012 - 12:12 PM

That is what it turned out be be. I didn't know how to check that and i was operating under the understanding that all the code we where working on was the .NET 4.0 framework. I was just adding to and modifying some existing code, even the ones who created the web service did not know it was in 2.0, so we are all a bit clueless as to how that ended up. I moved the target framework up to the .NET 4.0 framework and everything seems to be working.
Was This Post Helpful? 0
  • +
  • -

#4 Curtis Rutland  Icon User is offline

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4577
  • View blog
  • Posts: 8,019
  • Joined: 08-June 10

Re: Using Linq to SQL in a webservice

Posted 28 December 2012 - 12:41 PM

Glad you found it. Sorry I didn't see this post before you figured it out yourself :P
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1