If I wanted to have my data in SQL Server, but wanted to use a thick client WinForms application for users, what would be the best practice way to have calls occurring from WinForms to database? And how simple is this?
I guess I’m trying to gauge to what extent there are issues with this approach and one needs to go for some (a) middle tier with web services, or (b) have to go asp.net or something.
I really just have a simple app that needs a database and I’ll only have a 10 – 30 clients on a LAN/WAN network that would be connecting in.
EDIT: So the focus of my question was regarding the communications protocol/approach from the client PC to the Database, i.e. over the LAN/WAN
The simplest solution if you have PC’s and DB server close by is to use direct Linq-to-SQL approaches – no extra WCF service layer in between. Such a service layer adds a significant amount of complexity.
If you want to go that route (maybe because of your WAN clients), then I’d recommend you check out the WCF Data Services, a layer on top of bare WCF. It’s probably the easiest and quickest way right now to expose a data model (e.g. your Linq-to-SQL or Entity Framework model) as a REST feed to WAN/internet clients.
WCF in itself is indeed a big beast and thus scares away a lot of folks – but you don’t need to know each and every setting and knob it has in order to use it. For some intro to WCF, I recommend those two episodes of DotnetRocks TV – excellent intro material: