Reputation: 8626
This is a design question.
If you had to create a solution with tops 5 clients looking at the SQL Server (clients could read different databases with same schema though) in a Local Network only, would you create a WCF service for the database work (CRUD) or just leave the Data Access Layer direct in the client? which this makes the client independent!
Upvotes: 1
Views: 100
Reputation: 1038720
I would recommend you writing a WCF service contract interface and implementation into a separate assembly and used directly by the clients. If at some later stage you decide that you need interoperability you could always expose the assembly as a WCF service with a slight impact on the client side.
Upvotes: 0
Reputation: 754268
If this is in a LAN and will never be anywhere else - don't add an unnecessary WCF layer on top.
If you anticipate outside sources might want access to that data some day - then it might make sense to use a WCF DataService or something like that to expose the data.
WCF and Dataservices always add some extra layer, some extra processing, and thus cost some performance. If you only ever have 5 local users (in your company LAN) - there's really no compelling reason to use a WCF service for that, in my opinion. Just use a good data access technology (Linq-to-SQL, Entity Framework, NHibernate) and access that database directly.
An extra WCF service layer doesn't buy you any benefits in this scenario - so don't make things unnecessarily more complicated than they have to be.
Upvotes: 3