Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "rasoulshams"

v9.1.0 | MVC | .Net Core

How can I upgrade to the new version 10 (.Net 5)? What is the best route? And also, is it recommended?

In my app, I need to go through hundreds of records one by one, process each record, gather and analyse data for that record, create a new entity and store it in the database. Now, the storage of each record affects the processing of the next record; in other words, when the newly created entity is inserted, it has to be read along with other data from database to help decide how the next record on the list is processed, and s on.

Since UoW is used and data is persisted at the end of it, I use "CurrentUnitOfWork.SaveChangesAsync" to store each record after I process it within the loop but this results in a very slow overall process. I tried to disable UoW for this method using the "UnitOfWork(isDisabled = true)" attribute but I get an error stating that "Cannot access a disposed object". I did use the virtual keyword as well but no luck.

I have tried removing "CurrentUnitOfWork.SaveChangesAsync" and it does run 6 to 7 times faster but as all the data is persisted at the end of the unit of work, I won't have updated data when iterating through the original records. I need updated data after the newly created entity is inserted in order to process the next record.

Note that this is not a batch insert as I know EF Core is not suitable for that. This is individual insersion of numerous records.

I am currently running this as a Hangfire background job. I've tested the speed when not run as a job and the results are the same.

Is there any way to speed this up? I hope it's clear and appreciate if you can help.

Many thanks.

Question

v9.1.0 MVC .Net Core

I have tried to deploy my app to Docker but have had no success. I run the build-mvc.ps1 script and I get the following error:

Error: No such image: zero/mvc Step 7/24 : COPY ["src/[NAME].Web.Public/[NAME].Web.Public.csproj", "src/[NAME].Web.Public/"] COPY failed: stat /var/lib/docker/tmp/docker-builder070354949/src/[NAME].Web.Public/[NAME].Web.Public.csproj: no such file or directory

I'm not sure what needs to be done. I also tried to deploy to Azure by setting up a pipeline using your tutorial but again to no avail. The error is I get is along there lines: within Restore task in the pipeline:

##[error]Error: Failed find: ENOENT: no such file or directory, stat '/home/vsts/work/1/s/src/[NAME].Web.Mvc/node_modules/.bin/acorn' (Error screenshot below)

I appreciate if someone can help.

Many thanks.

Showing 11 to 13 of 13 entries