.Net5 CRUD using Multiple repositories from Single Controller
HTML-код
- Опубликовано: 10 сен 2024
- Asp.Net Core CRUD using Multiple repositories from Single Controller
In this Video I have a created a Product Master CRUD using Asp.net core and EF Core.
This is an Excellent ASP.Net Core CRUD Application with many fields. and the beauty of this application is, it has 5 foreign key fields. and all these foreign fields are displayed as select list controls in the user interface page.
So You will learn how to populate multiple select lists from different tables from this video.
Then, you will also learn to use the ForeignKey Attribute in Entity Framework Core to configure the Foreign Key Property.
We use the Foreign Key to define the relationship between the tables of the database.
For Example, In Our Inventory Manager Project, which we are doing for couple of months now. Every Product has a Measurement of Unit, BrandID, CategoryID, ProductGroupID etc.
Our Product table is in relationship with many tables inclusive of Unit , Category, Brand , ProductGroup and ProductProfile.
I mean, Foreign key Ids will be stored in the product table and the master values will be stored
in the primary tables like units, categories.
I have used multiple repositories in the Product Controller. Because while designing
an app using repository pattern, the back end data of the entity must be handled only by the corresponding repository of the entity.
in our case , the units table should be handled only by unitrepository and
likewise the category table should be managed only by the category repository.
But our Productcontroller needs data from many tables like units,categories, brands etc.
In Here I have explained very well on how I solved this problem.
To find and learn my solution. please watch the complete video.
Thanks and Regards,
Aniz.
Previous Video
• ASP .NET Core MVC CRUD...
Sorting Module link
• ASP.NET CORE EFCORE MV...
Playlist Link
• Asp net core 5 MVC Tut...
謝謝你,,你很厲害,高手
Very Nice. Thank you.
nice work dear friend , plz upload a video about "How to publish ASP core with Database on IIS " , Thanks for sharing
Sure I will and you are most welcome.
thank you sir , your very good teacher ... professional ..., if you have a time can you show us how to create and read barcodes. please .. please. 💟💟💟💟💟💟💟
you are most welcome. I will try to share some codes. I had done a project for generating barcodes 5 years back. but that was in vb.net. and not in use now. will try to find the source code in my library. Keep following the channel. Thank You.
How can we create 1 product with multiple units? Let's say,1 Pack = 12 Units
Thanks!
These all are Inventory units. for that you need add a conversion module. basically in most of the Inventory system inventory will be managed in one unit only called inventory unit. but the inwards and outwards can be in different units called packaging unit.
Sir, why product image is not viewed? How can I view it?
Thanks for watching. please watch again. may be you skipped some part.
Thank You for making this tutorial. I will be very grateful if you share the source code.
Welcome. and you can use this source code ruclips.net/video/ZXynHdk35fU/видео.html
What is the first video?
there is a play list. and the link of the playlist is in the description. please follow that.