Installing entity framework core

Entity Framework Core
[quads id=RndAds] Installing Entity Framework CoreIn this video we will see step by step installation of entity framework into application.Depending on our requirement we set up the project.  For example if your application isSingle Layer Web ApplicationIf it's a small project, you may have your presentation layer, business layer and data access layer all in one project. These means we can install the entity framework to our web application it selfMulti Layer Web ApplicationIn a large application we will usually have at least the following 3 layersPresentation LayerBusiness Logic LayerData Access LayerThese layers are implemented as separate projects. Entity Framework Core is usually required in the Data Access Layer project. The Data Access Layer project is a class library project and does not usually have the meta package referenced.Packages RequiredMicrosoft.EntityFrameworkCore.SqlServer: This…
Read More

Introduction to Entity Framework Core

Entity Framework Core
[quads id=RndAds] Introduction to Entity Framework CoreIn this tutorial will discuss about entity framework overview and will understand below points.What is EF CoreEntity Framework Core, also called EF Core is a complete rewrite from the ground up. If you have any experience with previous versions of Entity Framework, you will find lot of familiar features. EF Core is an ORM (Object-Relational Mapper). EF core is lightweight, extensible, and open source software. Like .NET Core, EF Core is also cross platform. It works on windows, Mac OS, and Linux. EF core is Microsoft’s official data access platform.What is ORMORM stands for Object-Relational Mapper and it enables developers to work with a database using business objects. As a developer we work with the application business objects and the ORM generates the SQL that…
Read More

ASP.NET CORE Installing Bootstrap

ASP.NET Core MVC
[quads id=RndAds] Installing BootstrapIn video will discuss and see example of how to install the bootstrap in asp.net core mvc.There are different tools available that you can use to install client-side packages such as JQuery and Bootstrap using Visual Studio. Some of the popular tools are as follows.BowerNPMWebPackLibrary Manager, etc.In this tutorial we are going to use Library Manager which is known as Libman to install the client-side packages.The Library Manager or LinMan is one of the most popular light-weight, client-side library acquisition tool. This tool is basically used to download the client-side libraries and frameworks such as Bootstrap and JQuery from a file system or from a CDN (Content Delivery Network). In order to use Library Manager, you should have Visual Studio 2017 version 15.8 or later version.Follow below…
Read More

Model validation in asp.net core

ASP.NET Core MVC
[quads id=RndAds] Model Validation In ASP.NET CORE MVCIn this tutorial we will discuss how apply model validation in asp.net core. Will seeHow to apply validation on models.How to display error messages. How to display all error messages.How to customize the error message.What are Different types of validation?As of now we have created a form which saves the employee details but we have not added any validation so we want name, class and school name to be mandatory fields If the required values are not provided and the form is submitted we want to display required validation errors and the age field is not mandatory but when use enters value that must be integer.To make name, class and school name field a required field, we need to apply the Required attribute on…
Read More

Model binding in asp.net core

ASP.NET Core MVC
[quads id=RndAds] Model Binding In ASP.NET CORE MVC In this tutorial we will discuss Model Binding in ASP.NET Core with examples. Understand the binding to primitive type and binding to complex types.Model binding maps data in an HTTP request to controller action method parameters. The action parameters may be simple types such as integers, strings, etc or complex types like Customer, Employee, Order etc.Model binding is great, because without it we have to write lot of custom code to map request data to action method parameters which is not only tedious but also error prone.The model binding refers to converting the HTTP request data (from the query string or form collection) to an action method parameters. These parameters can be of primitive type or complex type.Binding to Primitive Type:When an HTTP…
Read More

Form Tag Helper In ASP.NET CORE

ASP.NET Core MVC
[quads id=RndAds] Form Tag Helper In ASP.NET CORE MVC In this tutorial will discuss about form tag helper and how to create forms in ASP.NET Core MVC. In ASP.NET CORE mvc when we want to create forms then require different tag helpers.In this tutorial will discuss how to create forms in ASP.NET Core MVC. In ASP.NET CORE mvc when we want to create forms then require different tag helpers.Form Tag HelperInput Tag HelperLabel Tag HelperTextarea Tag HelperRadio Button Tag HelperSelect Tag HelperAt the end of this tutorial, we will create a Form using the above Tag Helpers. This form is used to create a Student.Let's add action into the StudenController to add students. Will be called CreateStudent and we require get and post action. So the get action initializes the and…
Read More

Image tag helper in asp.net core mvc

ASP.NET Core MVC
[quads id=RndAds] Image Tag Helper In ASP.NET CORE MVCIn this tutorial we will discuss and understand about the image tag helper fin ASP.NET Core MVCThis topic is very important if your application requires it to display images. So let's start understand the why require the image tag helpersSo before jumping let's understand the concept of browser caching and will see how he relates to the image tag helpersBrowser CachingIn general, when you visit a web page and if that web page contains some image, then most of the modern web browser cache the images for later use. In the future, when you revisit to that web page, then the browser loads the images from cache instead of downloading the images from the server.Disable Browser Caching If you want then you…
Read More

Tag Helpers in asp.net core mvc

ASP.NET Core MVC
[quads id=RndAds] Tag Helpers In ASP.NET CORE MVCIn this tutorial we will discuss tag helpers in ASP.NET Core MVC and significant of tag helpers. Tag helpers are one of the new features introduced in ASP.NET Core MVC.Tag HelpersIn ASP.NET Core MVC, Tag Helpers are the server-side components. They are basically used to perform defined transformations on HTML Elements. As they are server-side components, so they are going to be processed on the server to create and render HTML elements in the Razor files.If you are coming from ASP.NET MVC background, then you may find the Tag Helpers are similar to the HTML helpers.Types of Tag Helpers:There are two types of Tag helpers in ASP.NET Core. They are as follows:Built-In Tag Helpers: They come in-built in the ASP.NET Core Framework and…
Read More

View Import in ASP.NET CORE

ASP.NET Core MVC
[quads id=RndAds] View Import In ASP.NET CORE In this tutorial we will discuss View Import in ASP.NET Core MVC.The ASP.NET Core MVC and Razor comes with a lot of new advanced features for working with the Razor views. ViewImports is one of the new features and will discuss usage and scenario.In ASP.NET Core MVC Application, the _ViewImports.cshtml file provides a way to include the directives globally for Razor Pages so that we don’t have to add them individually in each and every view. the _ViewImports.cshtml file supports the following directives:@addTagHelper@tagHelperPrefix@removeTagHelper@namespace@inject@model@usingThe @addTagHelper, @tagHelperPrefix, and @removeTagHelper directives are basically used to manage Tag Helpers. The @namespace directive is basically used to specify the namespace that the ViewImports belongs to. With the help of @inject directive, it supports Dependency injection. We already use the…
Read More

ASP.NET CORE MVC ViewStart

ASP.NET Core MVC
[quads id=RndAds] ASP.NET CORE Mvc - _ViewStart.cshtmlIn this tutorial we will discuss view start in a ASP.NET Core MVC. How apply layout to all views and apply multiple layouts.In ASP.NET Core MVC Application, the _ViewStart.cshtml file is a special file and the code present in this file is going to be executed before the code in an individual view is executed. So, you can set the Layout Property in this file instead of setting the Layout Property in each individual view which is going to be executed before the actual view is executed.Let's take an example, As of now we have assigned a layout page for a particular view but  suppose we have 50 views in our application and all the 50 views want to use the same layout file.…
Read More