How to do Sort Search and Pagination in ASP.NET CORE 5 MVC CRUD with EF CORE Inventory Project

Sdílet
Vložit
  • čas přidán 6. 09. 2024
  • Next Part
    • How to Show Modal Dial...
    Previous Part
    • ASP.NET CORE EFCORE MV...
    In this tutorial I Will show you how to implement Search functionality using Entity FrameworkCore in ASP.Net MVC 5.
    we will add Paging, sorting and filtering functionality to our Unit Module of the Inventory Project.
    Here I have created PagedList class to do the Pagination in Object oriented methodology.
    This is a CodeFirst CRUD developed Using Repository Pattern EF CORE
    This project is done on asp.net Core 5 with MVC Using Entity Framework Core.
    What is Asp.net Core 5?
    Asp.Net Core 5 is the latest web framework by Microsoft
    ASP.NET is a great framework to use when developing web sites and web applications.
    It is reliable, fast, easy to use, free, and widely known.
    ASP.NET gives you full control of your development and can be used on any project, big or small.
    In this Video we will discuss all the basic, intermediate and advanced ASP.NET core concepts
    that help you build, data driven web applications.
    By the end of this video you will be able to perform all the CRUD operations i.e Create, Read, Update and Delete
    using SQL Server as our database.
    This Application is Developed using ASP.NET Core 5 MVC with EF CORE and Bootstrap.
    This video is made specially for beginners who does not have any knowledge in ASP.NET Core MVC
    and for the intermediate programmers who has problems in understanding MVC Concepts.
    I hope you definitely like this video.
    Kindly watch and Share.
    Thank You
    Part 1 -
    • Asp net core 5 MVC - I...
    Part 2
    • ASP.NET CORE 5 MVC Cod...
    ASP.NET CORE Object Oriented Sort
    Part 3
    • ASP.NET CORE EFCORE MV...
    DBFIRST CRUD
    • Entity Framework Core ...
    • Master detail CRUD in ...
    Master detail CRUD in Asp.net core 5 MVC using EF Core
    • AJAX asp.net core 5 MV...
    asp.net core crud with Ajax and Partial View using efcore
    Tags.
    Pagination in Asp.net
    Sort in Asp.Net
    Filter in Asp.NET
    Sort filter search Pagination
    search in asp.net mvc 5
    How to add Search Functionality in ASP.NET MVC 5
    How to add Search bar in ASP.NET MVC 5
    asp.core
    asp core
    asp.net core mvc
    ASP.NET Core 5.0 MVC
    Learn ASP.NET Core 5
    Learn asp.net Core MVC
    You can learn ASP.NET Core MVC for programming web applications
    General ASP.NET Core MVC tutorial
    We are going to use HTML and bootstrap.
    asp.net core tutorial
    You will first learn the ASP.NET core basics.
    Best guide to asp.net core MVC
    Learn the fundamentals of asp.net core MVC
    The best asp.net core 5 MVC tutorial out there.
    This is a video for asp.net core 5 MVC beginner
    .Net Framework tutorial video
    Master Detail MVC
    Master Detail Form
    Master Detail Crud in asp.net core 5 mvc using ef core
    masterdetail
    masterdetail asp.net core

Komentáře • 38

  • @MrMostafa2002m
    @MrMostafa2002m Před 3 lety +1

    Looking forward for the rest of this excelent series videoes,, please not to be hurry while explaining the next videoes

    • @CodeSbyAniz
      @CodeSbyAniz  Před 3 lety

      You are Most welcome! Stay Tuned. Thanks for informing it.

  • @kamajo7518
    @kamajo7518 Před 2 lety +1

    Hello Aniz,
    Great videos and explanation. Thank you for all and I look forward to more videos about Net Core 6..
    you make useful videos that have meaning and use!

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      You are Most welcome. will upload more videos soon.

    • @kamajo7518
      @kamajo7518 Před 2 lety

      @@CodeSbyAniz Hi Aniz, thank you for your reply.. I wanted to ask you, I am using net core 6 and my pagination which I made according to your videos is not working. I can't go to the next page. Please tell me, is there any difference between net core 6 and net core 5? For example, if I have to add something else to program.cz or do something else in the _TopBar template? So far I have not been able to solve the problem. Thanks for the reply. Have a nice day, Kamil

  • @franklint8301
    @franklint8301 Před 2 lety +1

    Very Simple and Neat Explanation. Thank You.

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      You are welcome! Thanks for the positive comments, it helps.

  • @komladzignefan409
    @komladzignefan409 Před 2 lety

    Good Morning,
    In Fact you are doing a great work and I enjoy it. I watch all your videos.
    Thanks
    However I'm still struggling to come back to two or three or four after I view the detail.

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      You are Most welcome. How can I help you?

  • @purnarana9081
    @purnarana9081 Před 2 lety

    Nice SIr, Thank you so much.

  • @nakibrahaman2228
    @nakibrahaman2228 Před 3 měsíci

    As I Implement the whole code and found that When I select more than 5 as selectOption then at the type of sorting it came to 5 records. How can this be adjusted?

  • @dougchittum6074
    @dougchittum6074 Před 3 lety

    I enjoyed your video and I followed along right with you. This was just the information I was looking for! But I wanted to mention an issue with your finished code. The records per page change is not kept when you change pages. If you select 10 per page, the pagination options adjust. But if you go to page 2, it defaults back to 5 per page. Didn' t know if you wanted to update your video. I'm working to resolve the issue myself. Would like to see how you resolve.
    Thanks for all your work and sharing with everyone!

    • @CodeSbyAniz
      @CodeSbyAniz  Před 3 lety

      Hi, Great to hear that you liked the video. Thanks.
      The code is working fine for me. may be you are missing some steps. see the video again or kindly check the _topbar.cshtml and _bottombar.cshtml code screen shots in the video. otherwise send your code to codesbyaniz@gmail.com. I will check and correct the code. the below code is working fine for me.
      @pge

    • @dougchittum6074
      @dougchittum6074 Před 3 lety

      @@CodeSbyAniz I surely will. Thanks for the reply. Will let you know if I get it working. Thanks again for the video!

    • @dougchittum6074
      @dougchittum6074 Před 3 lety

      ​ @CodeS I finally found the issue. In _topBar, the line 'asp-route-pageSize' was originally 'asp-route-data'. I pasted your sample in place and worked. Had to go and update the other lines as well for First, Previous, Next and Last. All working now! Thanks again Aniz!

  • @teachwithsaidrahman1984

    super bro

  • @jatuae3105
    @jatuae3105 Před 3 lety

    Great Bro Thanks

    • @CodeSbyAniz
      @CodeSbyAniz  Před 3 lety

      You are most welcome and please stay tuned. lot more to come.

  • @MMNatureLovers
    @MMNatureLovers Před 2 lety

    Hello sir, ur video is very good for us.But i have 1 question that in GetItems method when you call units = _context.Units.toList(); in this line program will get all of items from the database. Next line you split with paging and it is no problem.I think that If we have million of records we should not get all records and we should use with .Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList() when we start call getitems method.How about you ?

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      Thank you for following my channel. Yes You are right, the code you suggested will give better performance for large data.
      Actually I have not completed this topic yet. there is a tail end pending. which I kept for the Title "Advance paging and sorting." sooner I will create a video on IQueryable interface. in that I will show you how to join the sorting and paging logics. But now I don't want to complicate my repository. which will make the beginners difficult to understand. I can see lot of beginners following my channel.

  • @scottstinsman6424
    @scottstinsman6424 Před rokem

    I am getting an error in the _bottomBar.cshtml partial view. It is saying that asp-items="Model.GetPageSizes();" Cannot not implicitly convert type 'System.Collections.Generic.List' to 'System.Collections.Generic.IEnumerable'. An explicit conversion exists (are you missing a cast?) Any idea why I am getting this error?

    • @CodeSbyAniz
      @CodeSbyAniz  Před rokem

      I think you forget to include some libraries. please watch again. but I already shared the source code of this tutorial in some other video. so please check in the channel.

  • @ranaabushammalh2152
    @ranaabushammalh2152 Před rokem

    is search proccess is exsit in this project??

  • @chunshanfeng9786
    @chunshanfeng9786 Před 2 lety

    I followed all the code in the video, I have a question, after searching, if the result is over one page, how to go page two?

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      Hi,
      Clear the search and press enter, and if the list has data for more than 1 page the paging link for 2nd page will appear. try adding more rows to your list.
      Thanks & Best Regards,
      Aniz

  • @nishithkhambhati3260
    @nishithkhambhati3260 Před 2 lety

    Hello ... When I Searched something , Searching Operation is working perfectly.. But Pagination is not working and Search Inbox remains blank ... So Please Help Me ...

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      The source code of all master modules are below. this includes search and pagination codes. so please download and compare it with your project.
      czcams.com/video/k5USpRrQhM8/video.html

  • @vishalmakam7291
    @vishalmakam7291 Před 3 lety

    Hi sir, when you are uploading master details 3rd tutorial

    • @CodeSbyAniz
      @CodeSbyAniz  Před 3 lety

      Please follow my Inventory Project. will add all the concepts of asp.net core in it. Also share and spread this Master detail looking for 100k Views.

    • @vishalmakam7291
      @vishalmakam7291 Před 3 lety

      @@CodeSbyAniz ok sir, thanks

  • @amirulalwa8472
    @amirulalwa8472 Před 2 lety

    what is SelectListItem in your project sir? from 47:40 i got confused

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      select list item is a list item objects which can be set as the data source for any select list control using asp-items=="ViewBag.ProductList"

  • @funnyPashtoLol
    @funnyPashtoLol Před 2 lety

    Sourc code man

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      Hi Thanks for watching. please find below the source code video czcams.com/video/qzefiZPJC00/video.html

  • @funnyPashtoLol
    @funnyPashtoLol Před 2 lety +1

    Upload source code

    • @CodeSbyAniz
      @CodeSbyAniz  Před 2 lety

      Complete source is shown in the video. please watch the full video.

    • @DeeJie14
      @DeeJie14 Před 2 lety

      @@CodeSbyAniz can u provive a link step by step video