The text of this article is not in this database — only its details are. Read it on the old site: Manage Data (CRUD Operations) Using MVC4 Web API AngularJS
57 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.

ankit dixitPosted Nov 8, 2017, 8:19 AM
Its working thank you sir it was my fault my taking Controller Not API Controller Thank a lot sir
ankit dixitPosted Nov 8, 2017, 7:55 AM
You have creating perfect thank you sir but when you pass the url parameter in service.js url: ""/api/StudentsAPI/"", is not inserting record in student table what is api and student api can u explain than you
Jose MezaPosted Jul 7, 2016, 4:30 PM
Hi. I have problem creating Angular Module, Service and controller. The page said me the app is not define. I follow your steps to create this example. Thanks
vijayalaya kandhaPosted May 9, 2016, 2:54 PM
Thanks foir the wonderful artice Rahul. Am getting the below error ,am not sure what am missing here. Any help on this is greatly appreciated. <b> Description: </b>HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. <br><br> <b> Requested URL: </b>/api/StudentsAPI<br><br>
vijayalaya kandhaPosted May 9, 2016, 2:54 PM
Thanks Rahul for the article.
Sandeep RaturiPosted Apr 29, 2016, 2:04 AM
any bodey help me facing reterive metadata error at the time add controller class
Sandeep RaturiPosted Apr 29, 2016, 1:46 AM
thanks for good artical. But im facing unable to reterive metadata error at the time add controller class. please give solution ??
prasad aPosted Mar 16, 2016, 6:31 AM
Hi Rahul, If there adding the uploading student photo and displayed
arpita poojaryPosted Jan 25, 2016, 3:01 AM
Thank You very much. Excellent example with working condition. Am just a beginner your example has taught me angularjs.
John NaguPosted Jan 9, 2016, 5:15 AM
Any One Pls Explain Whats Api/StudentsApi in Controller page Code
saurabh kumarPosted Jan 5, 2016, 2:00 AM
hello when i m save the record it throw this exception ("Additional information: Unable to update the EntitySet 'Teacher' because it has a DefiningQuery and no <DeleteFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.")
Virender MehtaPosted Dec 18, 2015, 7:51 AM
Hii it is not working at all.
Swathi VullangiPosted Dec 10, 2015, 3:41 AM
thanks its really helpful
Nilesh JadavPosted Oct 1, 2015, 9:44 AM
Great Article sir
Rahul Kumar SaxenaPosted Sep 30, 2015, 1:30 AM
Is Connection string correct Bhanu Priya
Rahul Kumar SaxenaPosted Sep 30, 2015, 1:30 AM
Welcome vikash kumar
vikash kumarPosted Sep 29, 2015, 3:37 AM
Many many thanks sir. your tutorial helped me alot.
Rahul Kumar SaxenaPosted Jul 20, 2015, 9:03 AM
Stud is the object of Students.. nha le hong
Rahul Kumar SaxenaPosted Jul 20, 2015, 9:02 AM
Thanks Vipul Malhotra
Rahul Kumar SaxenaPosted Jul 20, 2015, 9:02 AM
thanks bestin Sebastian
Vipul MalhotraPosted Jul 20, 2015, 8:28 AM
Thanks for sharing. Really helpful
bestin SebastianPosted Jul 16, 2015, 7:30 AM
If there adding Validations is much more better,even if its helpful and worthy!!
nha le hongPosted Jul 7, 2015, 10:54 PM
Hi sir I don't know "stud" in data-ng-reapeat="stud in Students" ??? where is stud
Jun Wei NgPosted Jun 18, 2015, 3:14 AM
hi sir, when i finished enter student information, when i clicked the save it prompted me an error about "db.SaveChanges();"
Deepak kumarPosted May 30, 2015, 7:29 AM
Hi Rahul, I was trying to enhance this example. I want student first login to the application and then enter there details. I have created User table in database to save UserName and password. I have added the table in Model (StudentManagement.edmx) but was unable to hit the User table when I click on log in button on login page. In sort I want to have login page which will authenticate user from database username and password and if successful, then it will redirect the above example page.
Rahul Kumar SaxenaPosted May 23, 2015, 7:56 AM
salah sayed You can use Partial View and make a Ajax form to edit record in different view...
Rahul Kumar SaxenaPosted May 9, 2015, 9:28 AM
Thanks Debendra Dash...
Debendra DashPosted May 9, 2015, 3:26 AM
Very useful Rahul....Thanks a lot
Bharath Radhekrishna ChennuPosted Apr 15, 2015, 8:33 AM
Hi Rahul..I have created a Data Entities in controller files it shows GET: /Students/ so if click in browser with /students/ I am getting data. But If use the same in service.js it is showing no data. this.getAllRecords = function () {return $http.get(/Students/); Its not giving any data here. Please suggest any idea
Umesh BhardwajPosted Apr 8, 2015, 5:16 AM
Angular issue with IE9- Application is not working with IE9
salah sayedPosted Mar 25, 2015, 7:11 AM
how to make edit in another view not in same view
Rahul Kumar SaxenaPosted Mar 14, 2015, 1:51 AM
Thanks Sanket... If u see in Index.cshtml Above Image 20. I have added Module, Service & Controller references....
sanket shahPosted Mar 13, 2015, 3:36 AM
Hi Rahul, error is solved. I have not included the respective reference javascript files in module.js, service.js and controller.js as I am new to the angular js. Even also you not included the same in above code :P.
sanket shahPosted Mar 13, 2015, 3:20 AM
hi rahul. I have created above application step by step as you explained. but I am getting error. error description is below.Error: [ng:areq] Argument 'CRUD_OperController' is not a function, got undefinedhttp://errors.angularjs.org/1.3.14/ng/areq?p0=CRUD_OperController&p1=not%20a%20function%2C%20got%20undefinedminErr/<@http://localhost:57673/Scripts/angular.js:63:12 assertArg@http://localhost:57673/Scripts/angular.js:1580:1 assertArgFn@http://localhost:57673/Scripts/angular.js:1590:1 $ControllerProvider/this.$get</<@http://localhost:57673/Scripts/angular.js:8431:9 nodeLinkFn/<@http://localhost:57673/Scripts/angular.js:7599:34 forEach@http://localhost:57673/Scripts/angular.js:331:11 nodeLinkFn@http://localhost:57673/Scripts/angular.js:7586:11 compositeLinkFn@http://localhost:57673/Scripts/angular.js:7078:13 compositeLinkFn@http://localhost:57673/Scripts/angular.js:7081:13 compositeLinkFn@http://localhost:57673/Scripts/angular.js:7081:13 compositeLinkFn@http://localhost:57673/Scripts/angular.js:7081:13 compositeLinkFn@http://localhost:57673/Scripts/angular.js:7081:13 publicLinkFn@http://localhost:57673/Scripts/angular.js:6957:30 bootstrapApply/<@http://localhost:57673/Scripts/angular.js:1450:11 $RootScopeProvider/this.$get</Scope.prototype.$eval@http://localhost:57673/Scripts/angular.js:14401:16 $RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:57673/Scripts/angular.js:14500:18 bootstrapApply@http://localhost:57673/Scripts/angular.js:1448:9 invoke@http://localhost:57673/Scripts/angular.js:4185:14 bootstrap/doBootstrap@http://localhost:57673/Scripts/angular.js:1446:1 bootstrap@http://localhost:57673/Scripts/angular.js:1466:1 angularInit@http://localhost:57673/Scripts/angular.js:1360:5 @http://localhost:57673/Scripts/angular.js:26176:5 trigger@http://localhost:57673/Scripts/angular.js:2744:7 createEventHandler/eventHandler@http://localhost:57673/Scripts/angular.js:3014:9 http://localhost:57673/Scripts/angular.js Line 11607
Rahul Kumar SaxenaPosted Mar 2, 2015, 11:36 AM
ur Welcome !...
Rahul Kumar SaxenaPosted Mar 2, 2015, 11:36 AM
Thanks jcjensen 1...
jcjensen1Posted Mar 2, 2015, 11:10 AM
Ohhh, I understand, I GET it : ) . Great article. Thank you for posting.
Rahul Kumar SaxenaPosted Feb 27, 2015, 11:39 PM
Hi jcjensen1 in service you can see we are passing Method: also like Post, Put, Delete etc.. from here my service knowing which methocd of WEB API is calling...
jcjensen1Posted Feb 27, 2015, 6:04 PM
Can you explain how the GetStudents() WebAPI method is called by the service. The controller calls the service which gets the data from the API but how? The API method is GetStudents() but the service does not use that method name. The sevice uses a URI /api/SutdentsAPI without the method name, so how can that be enough to call the correct (GetStudents) method????
Rahul Kumar SaxenaPosted Feb 26, 2015, 12:57 PM
Thanks 2 All...
Dinesh BeniwalPosted Jan 31, 2015, 4:18 AM
Congratulations Rahul Saxena again Article of the day on ASP.NET
Ramchand RepallePosted Nov 24, 2014, 8:53 AM
nice article Rahul Saxena
Manish Kumar ChoudharyPosted Nov 23, 2014, 11:08 PM
nice one Rahul Saxena sir..
Jayraj GoswamiPosted Nov 22, 2014, 5:04 AM
wow rahul best example in angular js i like
Vithal WadjePosted Nov 22, 2014, 3:41 AM
Yes Rahul Sir u can nominate
Vithal WadjePosted Nov 21, 2014, 3:39 PM
Just out standing ,just i can say this will be another article of the day on Asp.net official site,great work keep it up
Guest UserPosted Nov 21, 2014, 8:06 AM
i liked the way you included Angular using Nuget packages.
Rahul Kumar SaxenaPosted Nov 20, 2014, 11:18 PM
Always Welcome Nimit Joshi ...
Nimit JoshiPosted Nov 20, 2014, 11:06 PM
That's the same what i want this time. I have been searching for this. Thanks.