An open API service indexing awesome lists of open source software.

https://github.com/gabrielpenteado/crud-aspnet-dotnet-csharp

CRUD operations; created with ASP.NET, .NET and C#
https://github.com/gabrielpenteado/crud-aspnet-dotnet-csharp

asp-net asp-net-core aspnetcoreidentity csharp dotnet dotnet-core razor-pages

Last synced: 3 months ago
JSON representation

CRUD operations; created with ASP.NET, .NET and C#

Awesome Lists containing this project

README

        


CRUD-ASP.NET-.NET-C#


CRUD operations; created with ASP.NET, .NET and C#


license

dot net version


### Build with

![C#](https://img.shields.io/badge/C%23-239120?style=for-the-badge&logo=csharp&logoColor=white)
![.NET](https://img.shields.io/badge/.NET-512BD4?style=for-the-badge&logo=dotnet&logoColor=white)
![SQLite](https://img.shields.io/badge/Sqlite-003B57?style=for-the-badge&logo=sqlite&logoColor=white)

### Requirements

- C#
- ASP.NET (Razor Pages; ASP.NET Identity)
- .NET (v8.0.101)
- [Entity Framework](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore)

### Instalattion

1. to create a new project.

`dotnet new razor -o --auth Individual`

2. Install Entity Framework package for SQLite.

`dotnet add package Microsoft.EntityFrameworkCore.SQLite`

3. Install dotnet-ef.

`dotnet tool install --global dotnet-ef`

4. Create migrations.

`dotnet ef migrations add `

5. Update database.

`dotnet ef database update`

6. Scaffolding (creating controllers and views with one command).

`dotnet tool install -g dotnet-aspnet-codegenerator`

7. Generate the code based on Entity Framework.

`dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design`

#### To generate the code pages CREATE, EDIT, READ, DETAILS, DELETE for the Student model
`dotnet aspnet-codegenerator razorpage Create Create -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students`

`dotnet aspnet-codegenerator razorpage Edit Edit -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students`

`dotnet aspnet-codegenerator razorpage Index List -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students`

`dotnet aspnet-codegenerator razorpage Details Details -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students`

`dotnet aspnet-codegenerator razorpage Delete Delete -m Student -dc ApplicationDbContext -sqlite -udl -outDir Pages/Students`

#### To generate the code pages CREATE, EDIT, READ, DETAILS, DELETE for the Subscrition model
`dotnet aspnet-codegenerator razorpage Create Create -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions`

`dotnet aspnet-codegenerator razorpage Edit Edit -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions`

`dotnet aspnet-codegenerator razorpage Index List -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions`

`dotnet aspnet-codegenerator razorpage Details Details -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions`

`dotnet aspnet-codegenerator razorpage Delete Delete -m Subscription -dc ApplicationDbContext -sqlite -udl -outDir Pages/Subscriptions`

- **to run this project:**

1. Clone the repository.

`dotnet tool install --global dotnet-ef`

2. Run Application.

`dotnet run`

## 🤝 Contributions

[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

The foundation of the open source community are the contributions, them inspire us to learn and create. Any contributions are greatly appreciated.

## 📄 License

This project is licensed under the MIT License. See the [LICENSE.md](https://github.com/gabrielpenteado/crud-aspnet-dotnet-csharp/blob/main/LICENSE.md) file for details.





Gabriel Penteado


Full Stack Developer



[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/in/gabriel-penteado)
[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/gabrielpenteado)
[![Gmail](https://img.shields.io/badge/[email protected]?style=for-the-badge&logo=gmail&logoColor=white)](mailto:[email protected])