Tips -#01 | ASP.NET CORE MVC Connect to Database ( PostgreSQL )

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and into this and we fold it into our column okay now we show our data in here [Music] hello guys welcome back to junkoda today i will show you how to use asp.net call connect to db progress okay let's start i need to create a new project i use asp.net call web application for the name join us and i use the net call version 5 and you can use this version of better than this okay we have a new project here and for this step we have a switch step and the first step we need to have connection string and we need to add a reference for backlash db okay and first live at the library progress db let me use with a nougat account nature okay and i use background idb version file in here okay now it is finished and after that we need to provide connection string we need to provide in this file application setting dot json okay and let you go by connections3 and i provide the name progress xul and i have two bottom edge in here one ignition string and db password okay here we have connection string and app and after that we need to provide application connection okay we need to provide in our config in here in startup we need to provide in configures service okay like this and let me explain in here we get our connection string from configuration the name and parameter number one and name and parameter number two and get from application setting dot json and this one we need to import our library after we install packet early we need to using npg actual localized actual library okay this we provide our connection to the builders connection string and after that we need to help db context for db contact it means we need to load up that what we want to get data to show okay and let me create a db context and the b db contact we need to create a new class i put the name is application contact okay and the class i need to extend from db and imports microsoft entity entity frameworks call okay and in this i need to create contractor so let me put here okay now we have a debian tag here and we need to have a class for data set okay and put i put here and so db set db set here we need to have a class i put the class name with student so i need to create a new class one more yes student okay and in this class i need to have the property of my table it is my table have id name and h okay so i need to create all the property so yes it's okay done okay now our contact is that and let's go back to startup when we have connection string and provided builder i believe we need to load the data to service context we need to load that down so we need to add the wiki tag okay and here's i need to import from there and one more thing is it is a library different we need to import entity framework call okay so step we finish a three step step number one is we need to provide string and load connection and number two we create a contact and number three we create a class here we need to provide data in here and number four we need to create a controller we need to create a new controller for student okay but the name is student controllers okay and false here we need to have a view for our student okay and let me create a new folder is to done and get it let me change here to stew 10 list okay the function and our files view we need to put the name is students okay i need to create view is and for our view here you need to put here to show them this okay and one more thing we need to add in our layout we need to have a new list here use controller student and action is student this okay let's do this okay and let's run this okay it's what for add the new function in list here is it can get overview so our step we need to get data from our context to overview okay and for use our context db that we already create application context we need to declare a new variable like this and import our model okay and we have a constructor for this controller when applications are up it will get the data from our context application context db and text and provide data into and provide the value into the variable and for return data to overview i use view bags okay so i will provide that to ubex the name is users if get from other data here okay and in our view we need to create a table a new tables and let me explain here is our titles and we need to get that from our view back the view back name okay users and into list and we put it into our column okay and let to run this okay and click here okay yes it's well okay now you show our data in here and let's if you want okay let me test a new cost in number four and i put the name asp.net call okay here the number is the same okay and refresh here okay it's right so our action is complete thank you for watching bye
Info
Channel: JoinCoder
Views: 104
Rating: undefined out of 5
Keywords: code, programmer, programming, life, Happy, funny code, CodeJoin, JoinCoder, laravel, coder coder, joincoder, html desing, css best, connection sql, sql server, laravel framwork, php, php framwork, desktop application, system free, POS free, HMS free, Hostpital, Hotel system, software develop, code show, talking code, live code, project code, develop project, c#, Java, javascript, Java script, php best
Id: o4o95fa33bc
Channel Id: undefined
Length: 8min 26sec (506 seconds)
Published: Sat Oct 16 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.