locked
simple restful service with Visual Studio Code RRS feed

  • Question

  • User-590375999 posted

    Hi i want to create simple restful service with visual studio code, i am new to restful service and visual studio code.

    Monday, July 3, 2017 4:18 AM

All replies

  • User1068175894 posted

    Why visual studio code(https://code.visualstudio.com), use Visual Studio Community (https://www.visualstudio.com/downloads/ )

    Create a new project of type Web Api, that will be your simple restful service

    Monday, July 3, 2017 5:11 AM
  • User991499041 posted

    Hi sivapooja,

    Hi i want to create simple restful service with visual studio code, i am new to restful service and visual studio code.

    To create Web API with Visual Studio Code

    Create a Web API with ASP.NET Core MVC and Visual Studio Code on Linux, macOS, and Windows
    https://docs.microsoft.com/en-us/aspnet/core/tutorials/web-api-vsc

    To create Web API with Visual Studio

    Build RESTful APIs with ASP.NET Web API
    https://docs.microsoft.com/en-us/aspnet/web-api/overview/older-versions/build-restful-apis-with-aspnet-web-api

    Regards,

    zxj

    Monday, July 3, 2017 5:20 AM
  • User-590375999 posted

    because visual studio code is free

    currently i am using vs2015 so i don't want another version of vs on the same machine.

    Monday, July 3, 2017 10:03 AM
  • User1068175894 posted

    Visual Studio Community edition is also free but has much more features than visual studio code, i think you cannot even debug asp.net code

    Monday, July 3, 2017 11:45 AM
  • User-474980206 posted
    Visual studio code does support debugging, and is well up to the the task of writing a webapi. If you want visual studio like scaffolding, then install yeoman and its plugin. You will have the up and running long before a visual studio install completes.
    Tuesday, July 4, 2017 6:05 PM
  • User-1202100973 posted

    Hi Siva,

    Pls see this video. This is very simple.

    https://www.youtube.com/watch?v=0nYD-_h5Nlk

    Tuesday, July 4, 2017 10:31 PM
  • User1068175894 posted

    I disagree with using geoman and all the nodejs dependencies and version conflicts and the like for a pure webapi application

    Writing a web api is the perfect use case for using visual studio, if you are developing for something else than .net I personally use Visual Studio Code but each tool should be used for its purpose

    Wednesday, July 5, 2017 5:54 PM
  • User1168443798 posted

    because visual studio code is free

    currently i am using vs2015 so i don't want another version of vs on the same machine.

    Hi sivapooja,

    Which type of restful service do you want to create?

    If you have VS 2015, I think there is no need to install VS code, VS 2015 is enough to create asmx web service, WCF Service and Web api.

    Is there any problem when you create web service with VS 2015?

    Best Regards,

    Edward

    Thursday, July 6, 2017 2:36 AM
  • User-590375999 posted

    Hi

    can create wcf service with .net core? if i can create can you post me the links to start wcf service with .net core?

    i need to use .net core because i need to deploy it on linux . 

    Thursday, July 6, 2017 6:45 AM
  • User1168443798 posted

    Hi sivapooja,

    >>can create wcf service with .net core?

    No, it is impossible. .Net Core is not supported to create WCF Service, it is not matter what develop tool you use.

    For your scenario, I think you need to develop WCF Service with .net framework, and then add service reference on .net core project to use the WCF Service, we could call service from .net Core, but we could not use .net core to create.

    For another option, I would suggest you try web api which is another service.

    Regards,

    Edward

    Thursday, July 6, 2017 7:29 AM
  • User1068175894 posted

    Take a look at NancyFx : http://nancyfx.org/

    This is a post from Scott Hanselman to implement a simple API using Nancy on .net core:

     https://www.hanselman.com/blog/ExploringAMinimalWebAPIWithNETCoreAndNancyFX.aspx 

    Thursday, July 6, 2017 1:24 PM