In this article, we are going to take a deep dive into the Frapper project template and see all details implementation of it.

Banner

Technologies Used

  • ASP.NET Core 3.1
  • Entity Framework Core 3.1

Install Tools

  • Visual Studio 2019
  • SQL Server 2019
  • .NET Core SDK 3.1

Feature Overview

  • Alerts
  • Custom User Management
  • Unit Of Work Using Entity Framework
  • Unit Of Work Using Dapper
  • Configure Menus by Roles
  • Custom Grids
  • Captcha
  • Cache Services
  • Dapper
  • Entity Framework Core
  • Create Pdf files
  • Create Notice
  • Capture Photo from WebCam
  • Cropping Images and storing
  • Create Notice
  • Download Files
  • Download Excel Reports
  • Exception Logging
  • FluentValidation
  • Globalization and Localization
  • health checks
  • jQuery Datetime pickers & Bootstrap Datetime pickers
  • Jtable Grid
  • Loader
  • Modal popups
  • Notification
  • Ordering Menus
  • Upload Files to store in a folder
  • Upload Files to store in Database

NuGet Packages which are used in Project

  • AspNetCore.HealthChecks.Redis
  • AspNetCore.HealthChecks.SqlServer
  • AspNetCore.HealthChecks.UI
  • AspNetCore.HealthChecks.UI.Client
  • AspNetCore.HealthChecks.UI.InMemory.Storage
  • AspNetCore.HealthChecks.UI.SqlServer.Storage
  • AutoMapper.Extensions.Microsoft.DependencyInjection
  • DinkToPdf
  • DNTCaptcha.Core
  • EPPlus
  • FluentValidation.AspNetCore
  • Microsoft.AspNetCore.Mvc.NewtonsoftJson
  • Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation
  • Microsoft.EntityFrameworkCore
  • Microsoft.EntityFrameworkCore.SqlServer
  • Microsoft.EntityFrameworkCore.Relational
  • Microsoft.Extensions.Caching.Redis
  • Microsoft.VisualStudio.Web.CodeGeneration.Design
  • SixLabors.ImageSharp
  • StackExchange.Exceptional.AspNetCore
  • X.PagedList.Mvc.Core
  • Microsoft.Data.SqlClient
  • Dapper
  • Newtonsoft.Json
  • System.Linq.Dynamic.Core
  • System.ComponentModel.Annotations

Getting Started

  • Clone code from Github: git clone https://github.com/saineshwar/Frapper
  • Open solution Frapper.Web.sln in Visual Studio 2019
  • There are 2 Database Scripts FrapperDB (Main Database),FrapperAuditDB (Request Audit Database) Download Database Script
  • appsettings.json file update DatabaseConnection (FrapperDB Database) , AuditDatabaseConnection (FrapperAuditDB Database)
  • Run Database Script which is provided
  • Make Changes in ConnectionStrings, ApplicationSettings, Exceptional, RedisServer in appsettings.json file
  • Build project which will restore all NuGet Packages
  • Final Step Run Project

Project Structure

Project Structure is simple to understand.

Frapper.Web

Frapper.Web which is Main ASP.NET Core Project Template.

Frapper.Web which is Main ASP.NET Core Project Template.

Frapper.Common

Frapper.Common this project contains all common libraries which are used in a project such as Session keys, AppSettings, ConnectionStrings, Algorithms.

Frapper.Common

Frapper.Entities

Frapper.Entities this project contains all Entities.

Frapper.Entities

Frapper.Repository

Frapper.Repository this project contains all Class which access database. In this part we have separated Responsibility into two different part reading and writing.

Command Folder contains all Commands such as Insert, Update, Delete using both Entity Framework and Dapper.

Queries Folder contains all Select Queries Using both Entity Framework and Dapper.

Frapper.Repository

Frapper.Services

Frapper.Services this project is used to write business logic and also common services such as generating Excel, PDF, Sending Emails. Frapper.Services project has reference to with Frapper.Repository project which means it can access the database directly and Frapper.Services project can be accessed in Frapper.Web project.

Frapper.Services

Frapper.ViewModel

Frapper.ViewModel this project contains all ViewModel used in project.

Frapper.ViewModel

Till now we have seen the Project structure if the Frapper project now let’s Move Forwards and see all features.


Features

Alerts

In this project we have used jQuery Confirm Alerts.

Alerts

Custom User Management

Custom User Management which contains Login, Registration, Forgot Password, Change Password. Disabling and enabling users.

All CRUD operations are done using the Repository Pattern and Unit of Work Pattern. Also, we have separated Responsibility into two different part reading (queries) and writing (commands).

  • Registration
Registration
  • Change password
Change password
  • Forgot Password
Forgot Password
  • Email Sent with Reset Password Link
Email Sent with Reset Password Link

Email Reset Link

Unit Of Work Using Entity Framework

Unit Of Work Using Entity Framework

Unit Of Work Using Dapper

Unit Of Work Using Dapper

Configure Menus by Roles

Configure Menus by Roles

Custom Grids

Custom Grids

Captcha

For Captcha we have used DNTCaptcha.Core Library.

Captcha

Cache Services

In this project we are using 2 caching services

  1. Memory Cache
  2. Redis

Memory Cache Implementation

Cache Services

Redis Cache Implementation

Redis Cache Implementation
RedisCacheService

Dapper

CustomerCommand
CustomerQueries

Entity Framework Core

UserMaster Queries

Create Pdf files

We are using this DinkToPdf Library for creating pdf.

PdfGenerator
PDF View in browser

Create Notice

In creating Notice form we have used Date Range Picker and CKEditor.

Create Notice

Rendering Notice

For rendering Notice we have used Bootstrap Modal pop.

Notice view in popup

Capture Photo from WebCam

WebcamJS library for capturing JPEG/PNG images in JavaScript

Capture Photo from WebCam

Cropping Images and storing

For Cropping Images, we are using SixLabors.ImageSharp library.

Cropping Images and storing

Upload Files

Upload Files

Download Files

Download Files

Download Excel Reports

For downloading Excel, we have used EPLUS library.

Download Excel Reports

Exception Logging

For Logging exception, we have to use StackExchange.Exceptional.AspNetCore.

Exception Logging

FluentValidation

FluentValidation validation library for building strongly-typed validation rules.

FluentValidation

Globalization and Localization

We have used 5 languages for demo. For that we have created 5 resource files.

Globalization and Localization
Resource file

Resource file

Resource file View

HealthChecks

HealthChecks
View HealthChecks in browser

jQuery Datetime pickers & Bootstrap Datetime pickers

  • jQuery Datetime picker
jQuery Datetime picker
  • Bootstrap Date Range Picker
Bootstrap Date Range Picker

Jtable Grid

Jtable Grid

Loader

Loader

Modal popups

We have used bootstrap modal popups and we have also rendered form in modal popup. And wrote whole validation using jQuery validation plugin.

Modal popups
Modal popups form

Notification

We are using Toasts Notification in this project.

Notification

Notification Service

Notification Service

Notification Partial View

Notification Partial View

Ordering Menus

For ordering menus, we are using jQuery UI sortable.

Ordering Menus

Upload Files to store in a folder

Upload Files
Upload Files to store in a folder

Upload Files to store in Database

Download files

By Saineshwar

Microsoft MVP for Developer Technologies | C# Corner MVP | Code project MVP | Senior Technical Lead | Author | Speaker | Love .Net | Full Stack developer | Open source contributor.