Relevants: Visual Studio 2010,
WCF WebServices,
Linq2Sql,
.Net 4.0
Forgive me if this is a stupid question, but I believe I have seen something similar to what I’m trying to do.
We have a Linq2Sql data context we are using to read/write to a database. We’d like to expose a public API to the database for certain vendors. I seem to recall a way to expose most of the data context functionality through a web service without creating wrappers for all the CRUD methods manually. Anybody out there know how to do this? I seem to remember seing the data context exposed through a web service with just a few lines of code.
We would also need to deny access to some methods, based on permissions, but can probably work through that ourselves.
Not sure what you saw or refer to… but WCF Data Services seem to be what you are after – check them out at http://msdn.microsoft.com/en-us/data/bb931106.aspx