WCF one service or multiple services -


I'm new to the WCF installation, I'm running this in my project, but I have 5 separate ' Services' like my one WCF project and I am wondering if I am doing the right thing for my services now 1-1 to my database tables I like something:

  Public Sector Projects: IPOJs {Public List> Project & gt; GetAll () {Return (Select the new project from project P. in the project. {ID = p.id, name = p.name}) ToList (); } Public Project GetByID (int id) {return (in connection with P. Data.Projects where p.id == ID select new project {ID = p.id, name = p.name}). first (); } Public Project AddProject (name of string) {var project = new Data.Projects {name = name}; Connection.Data.AddToProjects (project); Connection.Data.SaveChanges (); Return the new project {id = project.id, name = project.name}; } Public Zero DeleteProject (int id) {var project = (From connection to P.ID.Projects where p.id == ID select new project {ID = p.id, name = p.name}). first (); Connection.Data.DeleteObject (project); Connection.Data.SaveChanges (); }}  

Do I have a similar category for each tables in my project, should I find a way to use a service connection with subclasses or it can be found in the 1 service category Should be kept in the form?

"It depends!" :-) The standard answer for all IT and programming questions: -)

I do not see anything wrong with those 5 different services - you really do not see them all together Can not achieve big service, I will say. I would like to keep them separate and "LAN 'Aman."

If you have five different services, you can manage them for different access permissions, for example, Some user groups use one service, while others do not.

Again: I think you are correcting it - I do not get any reason or benefit by making a bigger service, There are five small, lemoners.

Come to gram - The only real change you can recommend is trying to design your services so that they can match your app more closely (i.e. your expected operation of your app and thus your services Rather than modeling them very closely with the database.

Mark

In the case of operations rather than "work-oriented" or underlying stores Try it.

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -