Hello everyone, I hope you are having a fine day. In today’s tutorial, I am going to discuss “ Software Testing and Debugging” During testing and debugging, seek advice for the various techniques of detecting and eliminating mistakes in a program, so that it produces the desired result. Every programmer needs to be aware of the truth that a program does not always run perfectly for the first time. It is consequently vital to make efforts in case you do stumble on the errors. First, determine and note any errors which are found during the very first building and running of the program. Many errors can occur when running a program, some apparent, and others are not. All these mistakes can be grouped under four types, namely: syntax errors, run-time errors, logical mistakes, and latent mistakes. Syntax problems are any violation of regulations specified within a programming language results in syntax mistakes. The compiler during the build and run process of the code will automatically define such errors. When syntax errors are found in the source code of the program, the compilation fails and terminates after listing the errors and the line numbers within the source code of the application where the errors have occurred. Remember, in a few cases, the line quantity won't precisely suggest the vicinity of the mistake. In different instances, syntax error can also result in an extended listing of mistakes. Correction of one of the mistakes at the beginning of the build of the ...
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at detailed Introduction to Entity Framework Core. It's our 16th tutorial in ASP.NET Core series. So far, we have covered the the MVC architecture and few concepts related to object oriented programming and now we are ready to get our hands on Databases. So, today we will cover data handling in detail, which is done by Entity Framework Core in.NET Core applications. So, let's first understand this Entity Framework Core: We have very limited support available for "Database First Approach" for now and we use this approach, when we already have the database. ( will cover it in future lectures) In Code First Approach, we design our database from scratch and using dbContext class, we transfer data from app to database & vice versa. So, that was all for today. We have successfully installed EF Core on our web application but we haven't yet created our SQL Database. In the next video, we will have a look at DbContext Class in Entity Framework Core. Till then take care & have fun!!!
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at Form Validation in ASP.NET Core. It's our 15th tutorial in ASP.NET Core series. In our previous lecture, we have created a Registration Form for our engineering website. But we haven't added any validations on the submitted data. So, even if users don't fill any boxes and just hit the Register Button, a new user will be created without any personal info. So, today we will place some checks on these text boxes to validate the user submitted data. So, let's get started with it: So, let's apply few of these Validation Attributes on our Properties in Engineers.cs file, placed in Models folder. We have already linked these properties with text boxes using asp-for Tag Helper. So, open this file & in Engineers class, place these validation attribute before properties, as shown in below figure: So, that was all for today. I hope you have enjoyed today's lecture. In next tutorial, we will have a look at detailed introduction to Entity Framework Core. Till then take care & have fun!!!
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at How to Create a Registration Form in ASP.NET Core. It's our 13th tutorial in ASP.NET Core series. In our previous lecture, we have seen How to use Tag Helpers in ASP.NET Core and have also discussed link, image & environment Tag Helpers. Today, we will have a look at Form Tag Helpers and with their help we will design a simple Registration Form in ASP.NET Core. It will be a quite lengthy tutorial so if you got into any trouble, then ask in comments. So, let's create our Registration Form: Inside these Enums, I have added few data and I am going to provide this data to my select elements in registration form, these enums are shown in below figure: Create Method for adding New User So, that was all for today. So far, we haven't placed any validation check on our submitted data, we will do that in our next lecture. Till then take care & have fun!!!
Hello friends, I hope you all are doing great. In today's lecture, we will have a look at HTML Tag Helpers in ASP.NET Core. It's our 12th tutorial in ASP.NET Core series. If you have worked on ASP.NET then you must have been familiar with HTML Helpers. Tag Helpers are quite similar to HTML Helpers with slightest difference in its syntax. Tag Helpers are new in ASP.NET Core and were not part of ASP.NET. So, let's first understand what are Tag Helpers & why we need to use them and at the end we will also discuss few common tag helpers in detail. So, let's get started with HTML Tag Helpers in ASP.NET Core: So, after adding this statement, we can now use Tag Helpers in our project. Let's have a look at few commonly used Tag Helpers: All Tag Helpers start with asp- prefix and are embedded in HTML tags as simple parameters. Now let's run this app and open this Info link and have a look at the HTML source, as shown in the below figure: So, that was all for today. I hope you have enjoyed today's lecture. In next tutorial, we will have a look at How to design Bootstrap navigation Menu in ASP.NET Core. Till then take care & have fun!!!
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at How to include & use Bootstrap in ASP.NET Core. It's our 12th tutorial in ASP.NET Core series. As it's ASP.NET Core tutorial so I am not going to explain bootstrap much. But you must have the basic idea of Bootstrap, its a client side package of CSS libraries, designed by twitter and these days you can't design a responsive site with Bootstrap as it follows symmetry and is too easy to use. So, let's get started with How to include Bootstrap in ASP.NET Core: So, that was all about bootstrap in ASP.NET Core. I hope you have enjoyed today's lecture. In the next tutorial, we will have a look at Tag Helpers in ASP.NET Core. Till then take care & have fun!!!
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at URL Routing in ASP.NET Core. It's our 11th tutorial in ASP.NET Core series and it's an important but quite easy concept to understand. You must be wondering how we are routing rite now as we haven't added any routing codes yet. But if you remember, we have used MVC with default route middleware in our pipeline and this middleware automatically sets up this default URL routing for our web application. So, let's understand how this URL Routing works in ASP.NET Core: I hope you have understood the Conventional URL Routing in ASP.NET Core, so that was all for today. In the next lecture, we will have a look at How to include Bootstrap in ASP.NET Core. Till then take care & have fun!!!
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at different Razor Layout Views in ASP.NET Core. It's our 10th tutorial in ASP.NET Core series. You must have noticed in websites that they have common sections, which remains the same throughout the website i.e. Header Section, Footer Section, Sidebar etc. In today's lecture, we will have a look at how to design these default layouts of a website. We have already discussed the MVC architecture in detail so now it's time to start building our site's layout or basic structure. Today we will just discuss different files available in ASP.NET Core for default layout designing. So, let's get started with Layout View in ASP.NET Core: So, let's add some code in our newly created Layout View File: Both of these C# lines will be getting data from the View, which will be calling this razor layout. Now, let's open our Info View file, and delete the wrapping HTML code, as shown in figure on right side. Now, I just have the content HTML code in my Info View file. Now let's enable this Info View file to use Razor Layout file and for that we have to include a new razor code block in our View file. Now run your web application and obviously you won't find any difference and if you check the Page soruce of Info page then you will find the complete html code in it with all required tags i.e. head, body, title etc. Now let's have a look at another property called Sections in Razor Layout Files: You must have ...
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at How to Create ViewModels in ASP.NET Core. It's our 9th tutorial in ASP.Net Core series. We have already covered Controllers, Models & Views in our previous lectures and now it's time to understand this fourth pillar of MVC architecture. ViewModel is not an integral part of MVC architecture and can be ignored in simple projects but in complex applications, we have to use ViewModel as it adds flexibility in the project. So, let's have a look at ViewModels in ASP.NET Core: So, that was all about ViewModels in ASP.NET Core. I hope you have enjoyed today's tutorial and if you have any questions, please ask in comments. Have fun!!!
Hello friends, I hope you all are doing great. In today's tutorial, we will have a look at How to Create Views in ASP.NET Core MVC. It's our 8th tutorial in ASP.NET Core series. In our 6th lecture, where we have set up MVC architecture, we have also created Controller & Model, but we haven't yet created any View to display this data properly. We have also seen Dependency Injection and have successfully injected Model Interface in our Home Controller. So, now it's time to add a View in our project and communicate it with Controller & Model. So, let's get started with Views in ASP.NET Core MVC: We have created the action method which is calling our View but we haven't yet added the View in our project, so let's do that: So, that was all about Views in ASP.NET Core MVC and I hope you have completely understood the working of MVC architecture by now. If you have any problems in MVC then ask in comments and I will sort them out. In the next lecture, we will have a look at ViewModel in ASP.NET Core. Till then take care & have fun!!!