简体   繁体   中英

Generating PDF in Asp.net MVC Application

I have multiple rows in my SQL database table in which some column I am using for generating the bill, What I am doing is I am fetching all the rows in the list and loop through that list and for each loop row I am performing the calculation and saving it into the list and then saving that into the database.

Now my Question is . 1. Is there any other way to execute the task I mean a better way and 2. How can I insert multiple rows from my Asp.net MVC application into the database(Just need Idea ). 3. And in the end of above process I want to generate a PDF containing all bill information

Thanks in Advance

  1. If you are using .NET 4.0 and above, you can user Parallel.ForEach . It uses all cores of the machine to finish the task. See this link.

  2. If you are using SQL Server 2008 and above, you can use Table-Valued parameter to pass multiple rows. See this answer for more detail

.3. To generate PDF you can use Free Spire.PDF for .NET

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM