in this video and my upcoming video, i will show you real-time use of the ionic application. so in this video, i will show you that how to create asp.net web API and use this in you ionic application
to learn asp.net web API visit my youtube playlist
https://www.youtube.com/watch?v=kwJqT53VvDw&list=PLI2mio_WEbYscvLd1tG0wsmZlMgwhaEOF
for creating asp.net web API you have visual studio required you can download visual studio from here https://www.visualstudio.com
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
namespace studentService.Controllers
{
public class studentsController : ApiController
{
// GET api/<controller>
public IEnumerable<student> Get()
{
using(studentDBEntities enti = new studentDBEntities())
{
return enti.students.ToList();
}
}
// GET api/<controller>/5
public string Get(int id)
{
return "value";
}
// POST api/<controller>
public void Post([FromBody]string value)
{
}
// PUT api/<controller>/5
public void Put(int id, [FromBody]string value)
{
}
// DELETE api/<controller>/5
public void Delete(int id)
{
}
}
}
====================================================
to download full source code and presentation visit our wesite and Blog
website : - http://dotnetlab.in/
source code : - https://github.com/rahuljograna
facebook page :- https://www.facebook.com/DotnetLab-1896440207343189/
visit my blog : - http://aspnetinhindi.blogspot.in
follow me on twitter : https://twitter.com/THEJOGRANA
No comments:
Post a Comment