Working with AutoMapper

Level : Intermediate
Mentor: Shailendra Chauhan
Type : GuidedLab
Points : 10
Duration : 02:00:00

Lab Details


In this lab, you will be learning how to implement Entity Framework Core Code first approach with AutoMapper into your ASP.NET Core applications. By the end of the lab, you'll have the skills to create an application with Entityframeworkcore. Learn how to connect to the database using entity framework core in ASP.NET Core. We also learn to do Data mapping using AutoMapper in ASP.Net Core.

Lab Objective

Upon completion of this lab, you will be able to:

  • Implement the Code first approach in EF Core using Migration
  • Implement AutoMapper for object mapping.
  • Implement CRUD operations


You should be familiar with:

  • Basic Understanding of ASP.NET Core
  • Visual Studio IDE

Lab Requirements

Suppose you have two entities – Department and Employee, where the Department entity has mandatory properties DepartmentId, Name, and navigation property Employees; and the Employee entity has mandatory properties EmployeeId, Name, Address, DepartmentId, and navigation property Department.

Do Complete the following tasks:

  • Create an Empty ASP.NET Core MVC application.
  • Create a Data Access Layer (DAL) Project.
  • Create Employee and Department Pages.
  • Create Employee and Department Entities in the DAL project.
  • Define database mapping with the help of the EF code first approach.
  • Objects mapping using AutoMapper
  • Create CRUD operations for Department. Please add confirm box before deleting a record.
  • Create CRUD operations for Employees. Here, you have to add and edit employees based on department. Please add confirm box before deleting a record.
  • Show Error messages while performing CRUD operations.

Self-paced Membership
  • 22+ Video Courses
  • 800+ Hands-On Labs
  • 400+ Quick Notes
  • 55+ Skill Tests
  • 45+ Interview Q&A Courses
  • 10+ Real-world Projects
  • Career Coaching Sessions
  • Email Support
Upto 60% OFF
Know More
Still have some questions? Let's discuss.
Accept cookies & close this