A simple diary CRUD app built with ASP.NET Core MVC and Entity Framework Core. Create, read, update, and delete personal diary entries with a web interface.
- Add and edit diary entries
- View all entries
- Delete embarrassing entries π
- Seeded with sample data
- SQL Server database with EF Core
- Clean MVC architecture
These instructions will get you a local copy of the project up and running.
- Visual Studio 2022+ (with ASP.NET and web development workload)
- .NET SDK 6 or later
- SQL Server Express or LocalDB (comes with Visual Studio)
- Clone the repo
git clone https://github.com/TDJR007/DiaryApp.git
cd DiaryApp- Update your connection string
Open appsettings.json and update the DefaultConnection:
"ConnectionStrings": {
"DefaultConnection": "Server=YOUR_SERVER;Database=Diary;Trusted_Connection=True;TrustServerCertificate=True;MultipleActiveResultSets=true"
}π‘ Tip: Use
Server=(localdb)\MSSQLLocalDBfor LocalDB
OrServer=localhost\SQLEXPRESSfor SQL Express
You can get the hostname by running hostname in command prompt.
-
Open Visual Studio
Launch Visual Studio 2022 or later.
-
Open the Solution File
Click on
File β Open β Project/Solution
Navigate to the folder where you cloned the repo, and open theDiary.slnfile.π§ The
.sln(solution) file links all your project files, so always open this.
To create the database and seed it with initial data:
- Go to Tools β NuGet Package Manager β Package Manager Console
- Run this:
Update-DatabaseYou should see a new database created in SQL Server.
Click the green Start button in Visual Studio, or press F5.
Navigate to /DiaryEntries to start journaling!
Pull requests welcome! If you spot a bug or want to add features like user authentication or Markdown support, open an issue or fork and go wild π
MIT β use this for anything!