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
venkat
NA
138
52.1k
how to make make fast my code in c#
Sep 7 2017 8:20 AM
Hi All,
i am uploading one excel file . file contains 5k Records .
it is taking around 29 minutes. how to make a fast .could please any one help?
below is my code.
Parallel.For(0, requests.Count, new ParallelOptions { MaxDegreeOfParallelism = 10 }, i =>
{
string s = requests[i].LdcName;
try
{
Utility utility = GetUtilities(client).FirstOrDefault(x => x.DEAbbreviation == requests[i].LdcName);
requests[i].LdcName = utility != null ? utility.Abbreviation : s;
client.PutUsageRequest(requests[i]);
statuses.Add(MapRequestToStatus(requests[i], true, SUCCESS_STATUS, i + 2));
}
catch (Exception ex)
{
//Report to the UI the provided ldc name
requests[i].LdcName = s;
statuses.Add(MapRequestToStatus(requests[i], false, ex.Message, i + 2));
}
});
Reply
Answers (
4
)
System.ArgumentException: Keyword not supported: 'provider
Facing the issue generating the data from MSSQL