| by Achyut Kendre | No comments

Entity Framework Code First Approach using ASP.NET MVC 5

Example Link: https://drive.google.com/file/d/1G5oroBmfsy30_avDAlZrsy27KGPCBGRl/view?usp=sharing What is Code-First? In the Code-First approach, you focus on the domain of your application and start creating classes for your domain entity rather than design your database first and then create the classes which match your database design. The following figure illustrates the code-first approach. The Code First Approach provides an […]

Read More
| by Achyut Kendre | No comments

ASP.NET MVC Scaffold Templates

Example Code : https://drive.google.com/file/d/1XQTimW39SuNI7kxrhvPmUQ_6MQlp34YC/view?usp=sharing Scaffolding is a technique used by many MVC frameworks like ASP.NET MVC to generate code for basic CRUD (create, read, update, and delete) operations against your model classes /database. For a view ASP.NET MVC provides you following templates – Empty Empty with Model List Create Edit Delete Details Empty template:- will […]

Read More
| by Achyut Kendre | No comments

How to Implement Validation in ASP.NET MVC? (Part 2)

Example Source Code: https://drive.google.com/file/d/18IPwYq1aujZ3waQHR0QTeeJvPp7By9H2/view?usp=sharing Other Attributes Data Type: this attribute will help you to define the data type of any model property which will be followed by helper while generating HTML in a view or ui, few data types are MultiLineText, Password, Credit Card, Url etc. Display: will help you to change the name of […]

Read More
| by Achyut Kendre | No comments

How to Implement Validation in ASP.NET MVC? (Part1)

Example Link : https://drive.google.com/file/d/1XRi7oC0jtIPRIFde7gw8XTTxX2iIP4yj/view?usp=sharing To implement a model validation in ASP.NET Core we need to use Data Annotation API. What is Data Annotation API in ASP.NET Core ? Data Annotation API is general purpose API provides you built in attributes those can be used for – Validation Data Types Display Rules Meta Data About Model […]

Read More
| by Achyut Kendre | No comments

Understand Linq Joins using DbFirst Example

Join Code Example: – https://drive.google.com/file/d/1hNIyl4ggcolcPNCyE6meEH-uhcPixWLF/view?usp=sharing Similar SQL Joins we can also implement the joins in LINQ. Linq provides you a join keyword which will help you to implement the joins in LINQ. Joins are required if you need the data from multiple tables together. Inner Join or Simple Join In LINQ This is similar to […]

Read More
| by Achyut Kendre | No comments

Database First Entity Framework Curd Example

Example Code: https://drive.google.com/file/d/1OrCfLK7lHZPjwmCKCQp5qQOwhiAMCyIU/view?usp=sharin In Last session we learnt about how to create a model and use linq queries against entities. In this article we will learn about how to implement select with search, create , update and delete operations using entity framework database first approach. for this example we are using following database structure – […]

Read More
| by Achyut Kendre | No comments

What is Database First Approach in Entity Framework?

Example Code: https://drive.google.com/file/d/1laZVt6zyzVNx8KmR0xL2TnbZj3wNlNJQ/view?usp=sharing In the Database First approach, we need to have an existing database and create a a business model from which we can use the Database first approach. Before starting directly with developing in MVC, let’s start with Exploring Database first. Database first approach is used when a database is ready; then Entity […]

Read More
| by Achyut Kendre | No comments

What is Entity Framework? Approaches of Entity Framework

What is Entity Framework? “Entity Framework is an object-relational mapper (O/RM) that enables .NET developers to work with a database using .NET objects. It eliminates the need for most of the data-access code that developers usually need to write.” Entity Framework is an open-source ORM framework for .NET applications supported by Microsoft. It enables developers […]

Read More
| by Achyut Kendre | No comments

Areas in ASP.NET MVC 5

Area Example :https://drive.google.com/file/d/1eZZdAbMT_x2HOVMMpU2yvvfv-V_5EahD/view?usp=sharing What is Area in ASP.NET MVC? Area allows us to partition/divide the large application into smaller units where each unit contains a separate MVC folder structure, same as the default MVC folder structure. You can divide the aplication into areas as per use case, or sub module or module or functional unit […]

Read More
| by Achyut Kendre | No comments

What is Layout View? How to use it in ASP.NET MVC 5?

Example Source Code: – https://drive.google.com/file/d/1JXyYV5N4Wet1oAii5yrZD4ISuuiNYdSh/view?usp=sharing What is Layout View? An application may contain a specific UI portion that remains the same throughout the application, such as header, left navigation bar, right bar, or footer section. ASP.NET MVC introduced a Layout view which contains these common UI portions so that we don’t have to write the […]

Read More