Web app made with ASP.NET, FluentAPI, ONION Architecture and SQL Server.
- Data persistence with SQL Server.
- Login, register and logout a user.
- Home page to see all users advertisements, except of logged user.
- Click to see all info of a publication and images (up to 4) in carousel style.
- Filter advertisements in home page by name and category.
- Advertisements and Category maintenance pages to perform CRUD operations.
- Logged user can only edit his advertisements.
- See how many active advertisements have a category with how many users.
- Form validations.
- Delete confirmations.
Onion Architecture provide a better way to build applications in perspective of better testability, maintainability, and dependability. Onion Architecture addresses the challenges faced with 3-tier and n-tier architectures, and to provide a solution for common problems.
- Microsoft.AspNetCore.Http - v2.2.2
- Microsoft.AspNetCore.Http.Abstractions - v2.2.0
- Microsoft.AspNetCore.Http.Extensions - v2.2.0
- Microsoft.EntityFrameworkCore - v5.0.17
- Microsoft.EntityFrameworkCore.InMemory - v5.0.17
- Microsoft.Extensions.Options.ConfigurationExtensions - v5.0.0
- Newtonsoft.Json - v13.0.1
- Microsoft.EntityFrameworkCore.SqlServer - v5.0.17
- Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation - v5.0.17
- Microsoft.EntityFrameworkCore.Tools - v5.0.17
- Microsoft.VisualStudio.Web.CodeGeneration.Design - v5.0.2
-
Create a SQL Server database.
-
Open solution in Visual Studio and edit the
ConnectionStrings
section onappsettings.json
inWebApp
layer.
"ConnectionStrings": {
"DefaultConnection": "Server=localhost,PortNumber;Database=DatabaseName;User=DatabaseUser;Password=DatabasePassword;Trusted_Connection=false;MultipleActiveResultSets=true"
}
- Run migrations.
- On Windows: Open
Package Console
and run:
Add-Migration Initial
Update-Database
- On Linux/MacOS: Install .NET Core CLI tools and run in terminal:
dotnet ef --startup-project ./WebApp/EMarket/ migrations add Initial
dotnet ef --startup-project ./WebApp/EMarket/ database update
- Run the project.
MIT License
Copyright (c) 2022 Anibal Ventura