Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть CRUD Operations in Controller and View – Session 50

  • Golden Courses
  • 2022-04-11
  • 212
CRUD Operations in Controller and View – Session 50
  • ok logo

Скачать CRUD Operations in Controller and View – Session 50 бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно CRUD Operations in Controller and View – Session 50 или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку CRUD Operations in Controller and View – Session 50 бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео CRUD Operations in Controller and View – Session 50

During this session, we are focusing on the implementation of CRUD operations in Controller and View in our ASP.NET Core MVC Web App. As I have already mentioned in session 48 CRUD stands for Create, Read, Update and Delete which are four basic operations that should be implemented in each persistent storage application. Also during that session, we developed our CRUD repositories for both static and SQL Server data storage. Hence, now we are developing these operations on the Controllers and Views of our Web App.

Implementing Create Operation in Controller and View in ASP.NET Core MVC
Earlier we discussed Action Methods, HttpsGet, and HttpsPost methods in detail. Now for implementing Create operation we need to create two Action Methods in the respective Controller. Then we should decorate one of them to [HttpGet] and the other one to [HttpPost]. Action Method with HttpGet decoration will return the form that we need for collecting data. Also inside this Action Method, we can get and then pass the required data (same as dropdown items) to the View. Then, after posting the data from View to Controller, the Action Method with HttpPost decoration is invoked. Then, this Action Method can check the validity of the posted data. Thereupon, if the posted data passed the validation check we can store the data in the storage media via Repository; otherwise, we can return the view with validation errors.

Display List of All Stored Records in ASP.NET Core MVC
We already implemented this practice during Session 22, yet due to implementing all the CRUD operations, we implement it again. Thus we need an HTTPGet Action Method. This Action Method collects the records via the Repository and passes the data to the respective View. Then, the View renders all the records with the foreach loop.

Implementing Read Operation in Controller and View in ASP.NET Core MVC
For this practice, we need again an Action Method with HttpGet decoration and input parameter. Inside the Action Method, via the Repository, we get the respective data that we receive its index from the input parameter. Then we pass the data to the View to display the detail of the selected record.

Implementing Update Operation in Controller and View in ASP.NET Core MVC
For Update a record, first we need an HttpGet Action Method. This Action method handles collecting current record data and passes the data and other required data to the View. Then we can modify the data inside the View and Post the modified data to the Controller again. This time the Action Method with HttpPost decoration handles the process. the Action Method checked the data validation and submit the data for updating the storage media if the data is valid. Otherwise, return the view with the validation errors.

Implementing Delete Operation in Controller and View in ASP.NET Core MVC
We can implement this function with HttpGet and HttpPost methods. But due to security reasons, we recommend implementing this function with the HttpPost method. Because the main difference between HttpPost and HttpGet method is the Cross-Site Request Forgery (CSRF) attack. Thus, if we implement this function with the HttpGet method, the end-users or hackers can delete the records maliciously. This behavior can be implemented through URL Query String or even malicious links.

Tutorial Playlist
https://bit.ly/3lxQP9n

Our Social Media
Facebook: https://bit.ly/310ksqA
Instagram: https://bit.ly/3cOq4th
Telegram: https://bit.ly/3s4mzWc

GitHub
https://github.com/aminseifoori/Daily...

Text Version of the course:
https://www.goldencourses.net/crud-op...

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]