I am ashamed that I ask so strange question. However, if someone knows what the error is, I'll be really glad!
I've just start learning AngularJS in ASP.NET MVC. To do this I downloaded sample from Microsoft website - CRUD Operations in MVC 5 using WebAPI with AngularJS. I've tried ask where the project is uploaded, but questons will be answered in two-three weeks.
I hope that a lot of people have met this example and solved this problem.
When I click "Save" after editing some person, then I just see infinite image. I waited twenty minutes, but "Friend" is not updated. How can I resolve it? I would like to edit and save Friends.
How can I save the item?
In my view this method should be called:
public HttpResponseMessage Put(int id, Friend friend)
{
if (!ModelState.IsValid)
{
return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
}
if (id != friend.FriendId)
{
return Request.CreateResponse(HttpStatusCode.BadRequest);
}
db.Entry(friend).State = EntityState.Modified;
try
{
db.SaveChanges();
}
catch (DbUpdateConcurrencyException ex)
{
return Request.CreateErrorResponse(HttpStatusCode.NotFound, ex);
}
return Request.CreateResponse(HttpStatusCode.OK);
}
What I see is just infinite loading:
However, nothing updates. Just always image is shown. What should I do? Thanks.