TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Niraj Singh
NA
159
16.3k
Getting concurrency in asp.net web api
Jul 20 2019 1:42 PM
Hi all,
I have written a asp.net web api and consuming from angular httpclient. A problem is being occured that the same api is called from different different source at the same time then the method that is being called from web api is being in concurrency.Here the method which is being called in web api is having large no of collection of data which is being modified by other call without finish of first call.
How can handle it please do needfull.
Below is brief code details.
[HttpPost]
[Route("api/getMenu")]
public IHttpActionResult getMenu()
{
var result=_master.getMenu();
return OK(new {menu=result});
}
Here getMenu method have some custome code which is creating Dictionary object to return sometimes happening here first method is not released control then second call is also trying to modfy first one and error is being occur.
Reply
Answers (
1
)
How to create pagination in Asp.Net core MVC
How to use ViewModel in Asp.Net Core MVC