Skip to content

This project implements a Library Management System that allows students to register and log in, while librarians can only log in (not register)

Notifications You must be signed in to change notification settings

BeyzaKomish/ASP.NET-MVC-LibraryApplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“Œ Project Title

Development of a Library Management System using ASP.NET Core Identity and Entity Framework


๐Ÿ“ Introduction

This project implements a Library Management System that supports essential functionalities such as:

  • CRUD operations (Create, Read, Update, Delete)
  • User authentication and authorization
  • Layouts with ViewBag/ViewData
  • Tag helpers, forms, and validation

The system allows students to register and log in, while librarians can only log in (not register). Both roles share some features, while others are role-specific.

The application consists of:

  • 3 Controllers
  • 17 Views (including default views)

๐Ÿ› ๏ธ Technologies Used

  • ASP.NET Core Identity โ†’ User authentication & role management
  • Entity Framework Core โ†’ Data access
  • ASP.NET MVC โ†’ Web interface
  • SQLite โ†’ Database storage

โœจ Features

๐Ÿ”‘ User Registration & Authentication

  • Students can register and log in.
  • Librarians can only log in (registration not available).
  • Role-based access control is managed using ASP.NET Core Identity.

๐Ÿ‘ฉโ€๐ŸŽ“ Student Features

  • Additional properties for student accounts
  • Borrow and return books
  • Leave and list reviews
  • View all books and categorized book lists

๐Ÿ“š Librarian Features

  • Additional properties for librarian accounts
  • Full CRUD operations:
    • Add books, genres, authors, and categories
    • Update and delete books

๐Ÿ‘ฅ Shared Features (Students & Librarians)

  • Search for books
  • View book lists
  • Access user info
  • List and view reviews

โš™๏ธ Implementation Details

๐Ÿ‘ค Users & Models

  • User entity inherits from IdentityUser
  • Student and Librarian inherit from User

Models Implemented:

  • User
  • Student
  • Librarian
  • Author
  • Category
  • Genre
  • Review

๐Ÿงญ Controllers

  • HomeController โ†’ Directs to Account and Dashboard
  • AccountController โ†’ Handles login & registration
  • DashboardController โ†’ Main functionality for the application

๐ŸŒฑ Seed Data

  • Multiple seed data files created to populate the database in advance
  • Views implemented for almost all actions

๐Ÿž Challenges Faced

During development, several issues were encountered and resolved, including:

  • SQLite Error 19: UNIQUE constraint failed: AspNetUsers.NormalizedUserName
  • Unable to track an entity of type 'User' because its primary key property 'Id' is null
  • FOREIGN KEY constraint failed
  • The model item passed into the ViewDataDictionary is of type 'Book', but requires IEnumerable<Book>
  • System.NullReferenceException: Object reference not set to an instance of an object
  • Request matching multiple endpoints
  • Validation issues (e.g., "Student field is required")

โœ… Conclusion

This project successfully demonstrates the development of a Library Management System using ASP.NET Core Identity.

Key concepts implemented:

  • Role-based access control
  • Custom user attributes
  • Integration with a relational database

๐Ÿ”ฎ Future Improvements

  • Introduce additional roles
  • Enhance UI/UX design
  • Add a notification system
  • Advanced analytics (e.g., student borrowing patterns)

๐Ÿ“š References

  • YouTube tutorials on ASP.NET Core Identity
  • StackOverflow discussions
  • ChatGPT assistance
  • Course documents from the professor

About

This project implements a Library Management System that allows students to register and log in, while librarians can only log in (not register)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages