Naming conventions with web service / WCF and no overload

11,829

There really isn't any "rule book" for naming conventions. You find one that works for you.

The most common adoption with .Net is to follow the Microsoft .Net naming conventions, and with Web Services, just treat them as an extension of your assembly, not as a special case.

http://msdn.microsoft.com/en-us/library/ms229045.aspx

So, GetMortgages(), GetMortgagesInPriceRange(startPrice,endPrice), etc... is fine.

As far as "saving", a lot of people will use the "SubmitNoun".

Share:
11,829
Admin
Author by

Admin

Updated on June 24, 2022

Comments

  • Admin
    Admin almost 2 years

    Currently have the task of designing a web service ( i am going to wcf but principles still apply) in c#. Problem is there is no overloading of methods which i am aware of so i need to name web methods with different names.

    I would really like some input on naming conventions, there just doesn't seem to be anything out there - for example.

    My main method is GetMortgages() - which returns all mortgages. I need another one where it will return mortgages within a certain price range so what would you recommend for this GetMorgagesPriceRange, InPriceRange, WithPriceRange.

    I am little confused about best practices fro naming web methods, i would love to just overload GetMortgages but of course with web services i can't...

    So would it be better to do GetNounDesciption??

    Anyone know of any good webservices out there that has a method that is the same but each method has different parameters passed - really like to know about anything here

    If it get practice to start my webmethod with GET if it is something that returns something??

    What about something that saves and sends something, is there a standard here?? i.e. PUT or SAVE ???

    There must be some kind of book of rule to follow??

    Really would like some input is anyone has any

    Thank you Mark

  • Stack User
    Stack User over 11 years
    if we have 10 parameters it will like GetXByYByZByWByWByS...... isn't it? Is it right?