I am just getting completely flummoxed trying to use LINQ to SQL in Oxygene to read data from our SQL Sever 2008. I’ve spent a couple of hours now flailing around with it. And then I spent about 5 minutes in VS 2012 Express and got a working example going.
In VS Express, I right-click on my solution and choose Add->New Item. Under the Data node of Visual C#, there is “LINQ to SQL Classes”. No such thing exists in the New Item dialog for Oxygene. Where does one go to find this? If I had Oxygene installed under the full VS edition, would it be there? Seems doubtful that’s the issue, since it’s there in the VS Express version but maybe they don’t let the Shell users do as much.
Well, I haven’t been able to get the Entity Framework to work in Oxygene, either, but that’s for a different post. Personally, I’d like to be aware of more than just the latest MS technology (which it will likely deprecate in another year or three in favor of it’s newest “best thing ever”). If I had a nickel for every technology MS “deprecated” while it was still being widely used - well, I’d have at least enough to buy cup of coffee. Maybe not a latte.
I’d like to broaden my resume and LINQ to SQL seems like it could be handy. One approach isn’t always appropriate for every app between large and tiny. I often write quick-and-dirty utilities that just use ADO. And we ex-Delphi programmers know MS’s track record for deprecating useful technology so you have to use their new tools better than anyone else.
Be that as it may, I’d still like to use the technology. I feel like I’m running into more things than I expected where the answer is “oooh, you’re using Oxygene and not C# - nope, can’t use that.” From the pitch based on Oxygene using native technologies and not creating its own layers, I felt like investing in it instead of just C# was going to be a bit more painless.
I’d love to get some help with Entity Framework. I’ll create another post about it just to keep from sidetracking this one. Still interested in what RO staff might have to say.