Skip to content

muratsedev/todo-mvc-to-excel

Repository files navigation

Learn .Net Simply:
How we can export Data to Excel file in .Net MVC web application?
Requiremets:
- Visual Studio Code (Free and Open Source)
- .Net SDK version 9 (Free and Open Source)
- Basic Knowledge in CLI
- Basic Knowledge in C#
- Basic Knowledge in Boostrap
- Basic Knowledge how to use SQLiteStudio (Free and Open Source)
- Basic Knowledge HTML, CSS

Create a new folder and name it ToDoApp
dotnet new mvc -n . -au Individual
Create SQLite db into ToDoApp folder
Create a "ConnectionStrings" into file "appsettings"
Create a new class in Model folder name it "ToDo" and I add some of data
dotnet tool install --global dotnet-ef

dotnet ef migrations add AddTodoTable
dotnet ef database update

Create into "Models" folder "Todo" class 

Then Create 
Creat TodoController.cs into "Controller" folder and write some of code to Appy CRUS operations
Goto folder "Views" and create a sub folder name it "Todo"
Create Views as below:
- Index.cshtml
- Create.cshtml
- Edit.cshtml
- Details.cshtml
- Delete.cshtml

Create "Data" folder if not found then create into it and name it "ApplicationDbContext"

into file _Layout.cshtml write some of code to update the navigation to add a link to the Todo page

Then go to terminal and write to check if any error 
dotnet build
or
dotnet build ..csproj

then
dotnet run

*
We need to 
SQLiteStudio
*
https://sqlitestudio.pl/

*


dotnet add ..csproj package EPPlus --version 7.5.0
dotnet build ..csproj
dotnet run --project ..csproj

 
Add the export functionality to the TodoController, Views and Program.cs files
Add some of code into "appsettings"




About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published