How to learn this new dotnet [Resolved]

Posted by Jayakumars under C# on 3/31/2017 | Points: 10 | Views : 369 | Status : [Member] [MVP] | Replies : 4
Hi

What is use of webapi in asp.net?

why we need use this and advantages this?

any one post CRUD operations webapi with angularjs

Mark as Answer if its helpful to you


Responses

Posted by: Rajnilari2015 on: 4/2/2017 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 50

Up
0
Down

Resolved
What is use of webapi in asp.net?

Web API is a REST based architecture for building highly scalable Http Services which can be consumed by a wide range of clients like browsers, mobiles, tablets etc.

Asp.net Web API is a framework for building highly scalable Http Services which can be consumed by a wide range of clients like browsers, mobiles, tablets etc. It contains the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection. Though it is not a part of the MVC Framework, however, it is a part of the core ASP.NET platform. It supports convention-based CRUD Actions as it works with HTTP verbs GET,POST,PUT and DELETE and returns a Http Status code. WebAPI responses are typically of JSON, XML etc. The Web API's MediaTypeFormatter does the transformation of the WebAPI's responses. Since one of the response type is JSON which is schemalesss, it is easy to consume from the range of clients like browsers, mobiles, tablets etc.


Why we need use this and advantages this?

- Used to build simple, non-SOAP-based HTTP Services
- Easy to create REST based services.
- Easy Routing
- It is lightweight framework.
- Easy JSON serialization and de-serialization and it is faster also since it is schemaless.
- Open Source.

Any one post CRUD operations webapi with angularjs
Yes. There are plentiful in DNF. To start with please look into A Beginners Guide to work with ASP.NET Web API and AngularJS ( http://www.dotnetfunda.com/articles/show/3309/a-beginners-guide-to-work-with-aspnet-web-api-and-angularjs ).

Also CRUD demonstration using WebAPI (http://www.dotnetfunda.com/articles/show/3341/crud-demonstration-using-webapi-with-aspnet-core-mvc-using-inbuilt-di ) will help.

For more information about Web API and related, please refer

a) Techfunda's ASP.NET MVC > Web API (https://techfunda.com/howto/asp-net-mvc/web-api )
b) ASP.NET Web API Articles at Dotnetfunda ( http://www.dotnetfunda.com/articles/cat/222/aspnet-web-api )
c) WebAPI Interview questions at Dotnetfunda (http://www.dotnetfunda.com/interviews/cat/222/aspnet-web-api )

Hope that helps. Let us know if you need further assistance.

--
Thanks & Regards,
RNA Team

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 4/3/2017 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi

Also CRUD demonstration using WebAPI (http://www.dotnetfunda.com/articles/show/3341/crud-demonstration-using-webapi-with-aspnet-core-mvc-using-inbuilt-di ) will help.


this is not working now

can you post some other proper crud operations Web api with angularjs source code

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rajnilari2015 on: 4/3/2017 [Member] [Microsoft_MVP] [MVP] Platinum | Points: 25

Up
0
Down
"this is not working now" .... means????

You create the DB layer using Code first Approach. (provided in that article)

How to expose the data is demonstrated http://www.dotnetfunda.com/articles/show/3309/a-beginners-guide-to-work-with-aspnet-web-api-and-angularjs

Now tell me what is that is not working? Please.....

And what have you tried so far?

Remember, any forum is meant to help/guide where the OP is stuck and not to do the entire exercise.

--
Thanks & Regards,
RNA Team

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 4/3/2017 [Member] [MVP] Bronze | Points: 25

Up
0
Down
Hi

I have few questions for this

what is difference between WCF and Webapi

In crud operations i did not find this template in my VS 2015 -> 4.6 framework can you guide me this

File -> New -> Project -> Web -> Asp.net Core Web Applications(.Net Core)


then i need database connectivity also your code static records no need them

i need database connectivity

Mark as Answer if its helpful to you

Jayakumars, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response