Тёмный

.NET 6 Web API with Entity Framework Core and SQL Server. Angular 13 CRUD App. Full stack. 

James Schneider
Подписаться 3,5 тыс.
Просмотров 195 тыс.
50% 1

Опубликовано:

 

30 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 222   
@dineshoduri2818
@dineshoduri2818 2 года назад
People who share thier knowledge are like hero's who save universe...you are one such hero. Thank you very much.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@danielgoldin6107
@danielgoldin6107 2 года назад
great video tutorial. James is a very patient instructor who goes through everything. really learned a lot. thank you James
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@ProtikPC_pro_indigo
@ProtikPC_pro_indigo 2 года назад
@@jamesschneider8677 I have a request here. A .NetCore WebAPI, using SQL Server AND calling MSSQL storedprocedures. With angular front end app. Demonstrating - Role based login and logout [generating jWT token, and refreshing it after approx. 60 minutes] and protecting the access of resources based on role[suppose 1 specific page in the app. that will only be accessible by the higher role] Assume 2 roles - Admin, Reader. Possible?
@jamesschneider8677
@jamesschneider8677 2 года назад
@@ProtikPC_pro_indigo This is an excellent suggestion. I would definitely like to do this. But it has been hard to find time to make a good video lately.
@ProtikPC_pro_indigo
@ProtikPC_pro_indigo 2 года назад
@@jamesschneider8677 Ok, when you find some respite, hopefully very soon. Will very eagerly await it from you,
@timothyobidike
@timothyobidike 2 года назад
Just Subscribed to your channel, Honestly, I do love your skills and how you type in your codes instead of copy and paste-like most tutors, that gives me time to think about what you are doing. Thank you for the video
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Thanks for the compliment
@mpadierna
@mpadierna 2 года назад
Hi James!. Great video, very clear and concise, thanks for posting it! I added a couple of modifications: 1) In the inspections controller, added the Include method, to show the type name right from the server: // GET: api/Inspections [HttpGet] public async Task GetInspections() { return await _context.Inspections.Include("InspectionType").ToListAsync(); } Then, in the show component: you ca use any of these options: {{ inspectionTypesMap.get(item.inspectionTypeId)}} or {{ item.inspectionType.name }} In order to get this to work, it's necessary to add a line in add-edit-inspection-component.ts: ngOnInit(): void { ... this.inspectionType = this.inspection.inspectionType; ... 2) In the same order of ideas, did this to show the type when editing: in add-edit-inspection-component.html
@jamesschneider8677
@jamesschneider8677 2 года назад
Very nice. Thanks for sharing.
@AndrewYurchenko
@AndrewYurchenko 2 года назад
Thank you for the lesson. I'm looking for good C# tutorials. I've been working with Angular for over a year. In Angular it is very bad to specify types as any. But as for the introduction, the lesson is very well built.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Thanks for the feedback. You're right, it's a best practice to avoid using any for the type if possible because you aren't taking advantage of one of Typescript's strengths and might run into problems later.
@michaszura8940
@michaszura8940 2 года назад
Great video ! I'm really glad we've got people like you who share knowledge in such a good way ! Everything is explained when you're not a newbie. Good job. Looking forward for next video !
@jamesschneider8677
@jamesschneider8677 2 года назад
@Michal Szura, you're welcome! Thanks for the compliment.
@michaszura8940
@michaszura8940 2 года назад
@@jamesschneider8677 I'd like to improve the project and implement logging in and authentication procedure. What would you choose if you had to do this ? Could you give me a hint how should I start ? This client-server and CORS is something new for me :)
@jamesschneider8677
@jamesschneider8677 2 года назад
Great idea to keep going with the project to make it better! I'm planning to make a video about this, but I'm not sure how soon it will be. I know it's not always fun to read documentation, but I would start there. docs.microsoft.com/en-us/aspnet/core/security/authentication/identity-api-authorization?view=aspnetcore-6.0
@nastasjabakovic413
@nastasjabakovic413 2 года назад
congratulations! I haven't looked at a better and clearer coding process in a long time!!! 🥰 a thousand stars for this man! ⭐⭐⭐⭐⭐
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you! I'm really glad you enjoyed it. Thanks for the compliment.
@DNCharLeys
@DNCharLeys 2 года назад
Followed through each second! Great tutorial! Thanks for this
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@usernotfound2727
@usernotfound2727 2 года назад
Great concise and to the point project. BTW @24:00 VS didn't do weird thing , James you forgot to build/ save the project .
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks for noticing that.
@HiroonWijekoon
@HiroonWijekoon 2 года назад
Thanks for the video! Clear and Simple!
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@lorenzovarese9024
@lorenzovarese9024 Год назад
dotnet ef database update (result in an error in my case) At 24:52 if someone has: "A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)" The solution is changing the ConnectionString adding TrustServerCertificate=Yes; at the end
@jeyaseelanjaandukondaan9869
@jeyaseelanjaandukondaan9869 2 года назад
very very useful, actually this is what i was looking for.
@jamesschneider8677
@jamesschneider8677 2 года назад
I'm glad to know that.
@RAvinderNathan2008
@RAvinderNathan2008 2 года назад
22:00 Use dotnet tool install --global dotnet-ef if you are getting error >> dotnet : Could not execute because the specified command or file was not found.
@yigit2505
@yigit2505 2 года назад
u can use this one before InitialCreate method : dotnet tool install --global dotnet-ef .
@returntime5616
@returntime5616 2 года назад
thanks
@JP-td8gt
@JP-td8gt 2 года назад
I had no idea you can build the table structure in class file and run that migration command. On top of that you ran one step to create your controllers with all the httpget post put etc commands. It was daunting to me to have to hand type all that. It goes to show your efficiency. Thank you as I’m new to all this api building.
@LeonardoJrUy
@LeonardoJrUy 2 года назад
This was very helpful and enjoyable. You are awesome. God bless you!
@saladenomilad1550
@saladenomilad1550 2 года назад
I want to thank you with all my feelings , really really really thank you
@jamesschneider8677
@jamesschneider8677 Год назад
You're welcome!
@mohamedatia7978
@mohamedatia7978 2 года назад
Thanks for this updated tutorial wish you best luck
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Thanks for watching.
@fuzzy0001
@fuzzy0001 2 года назад
thank you James.. great effort
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome
@nizarouertani1315
@nizarouertani1315 2 года назад
that was more than amazing your'e saving lives
@jamesschneider8677
@jamesschneider8677 2 года назад
I'm glad you enjoyed it.
@andreeacojo2314
@andreeacojo2314 2 года назад
amazing tutorial, it came out exactly when I needed it!!
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks!
@fg87fgd
@fg87fgd 2 года назад
At 22:00 the cmd line did not work, because you did benefit from autosave, which is triggered when you start the build within studio...
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks, @Norbert Paul Vossiek
@fantasticalforestart
@fantasticalforestart Год назад
This video is amazing. Thank you.
@jamesschneider8677
@jamesschneider8677 Год назад
You're very welcome!
@lordoflordran8884
@lordoflordran8884 Год назад
Thanks a lot, this tutorial was extremely helpful and awesome! Edit: I will definitely be watching more of your videos.
@jamesschneider8677
@jamesschneider8677 Год назад
Glad it was helpful!
@P4ul_W4lker
@P4ul_W4lker 2 года назад
Amazing video! You the best
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks, @Taylor Griffin!
@vodinhchi
@vodinhchi 2 года назад
THANKS FOR YOUR VIDEO 👏👏👏👏👏
@lethanhthoai6140
@lethanhthoai6140 2 года назад
Thanks for sharing the video.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome.
@OomNick
@OomNick 2 года назад
Thank you for this great course, I really learned alot.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@AddisInfo1
@AddisInfo1 2 года назад
Thank you James! this is very helpful video with clear explanations, really learned a lot from this video. thank you very much again! keep it up!!!!
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you, AddisInfo! I'm glad it was helpful for you.
@danielmyers9580
@danielmyers9580 2 года назад
great tutorial. thanks!
@jamesschneider8677
@jamesschneider8677 Год назад
You're welcome!
@mervinwee2938
@mervinwee2938 2 года назад
Hi, thanks for taking the time to do this tutorial, it helped a lot for me to practise Angular and .Net, and just for me to have a quick addition to my portfolio. For the editing of the inspection type in app-edit-inspection.component.html, I think this could be used instead of the input: {{ type.inspectionName }} Also, for the show-inspection.component.css, since the selectors are the identical, they could be combined into one: #add-success-alert, #update-success-alert, #delete-success-alert { display: none; animation-name: fadeInAndOut; animation-duration: 4s; }
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks for the comment.
@yosraguedda7929
@yosraguedda7929 2 года назад
This was very helpful, thank you so much for this great job, you are the best..
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@niravparekh5073
@niravparekh5073 2 года назад
So awesome explanation, thanks a lot.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@cassiegopalakrishna
@cassiegopalakrishna 2 года назад
Great content easy to follow explanation. Thanks man🤗
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@duming3076
@duming3076 2 года назад
非常感谢!!!
@alyeasin3367
@alyeasin3367 2 года назад
Thank you. it helped me a lot
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@Latif127
@Latif127 2 года назад
Awesome, it is a great video.
@jamesschneider8677
@jamesschneider8677 2 года назад
I'm glad you liked it!
@miguelpayran9509
@miguelpayran9509 2 года назад
amazing content I learned so much!!!
@Alyaman_Accounting_System
@Alyaman_Accounting_System 2 года назад
great tutorial thanks for all
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome
@gavansebastian
@gavansebastian 2 года назад
Hi. When i try to migrate the database i get this error: An error occurred while accessing the Microsoft Extensions Hosting services. Continuing without the application service provider. Error: Failed to load configuration from file 'C:\Users\user\Downloads\******\******\***\***\***\appsettings.json'. (i have the same connection string)
@VijayKumar2040
@VijayKumar2040 2 года назад
Thanks, It's really help me.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome!
@andrewearl8926
@andrewearl8926 2 года назад
Ok I cannot figure out why my angular project take/display from my api. The url is right because I can go to that url in the web browser and see json objects. The api works because swagger works on updating the db. the component works because I can display everything until the ngfor for the data. I followed your service creation exactly and I dont know where I went wrong.
@juanalvarez3581
@juanalvarez3581 2 года назад
This video got me a job!
@jamesschneider8677
@jamesschneider8677 2 года назад
Congratulations! Thanks for sharing.
@z.c13
@z.c13 2 года назад
Hello, Thank you very much, for this video. It was very nice and clear explanation. Can you tell us how to create a dynamic panel dashboard menu which are generated from the database, as well as include dropdown or submenu templates.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Your suggestion is on my list.
@Pasaaydaan
@Pasaaydaan 2 года назад
I am getting error Uncaught TypeError TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" Any help please?
@raymonkv4812
@raymonkv4812 2 года назад
Hello, Thank you very much, for this video. Please active subtitle
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Sorry, I can't activate the subtitles. It is something that RU-vid normally creates automatically, but it did not work in this video.
@howhq
@howhq 2 года назад
Hey thanks for the great tutorial. At around 57 minutes in the video, when I run "ng serve --option", I get the error: Error: src/app/app.module.ts:21:5 - error TS1005: ',' expected. My code matches the code in the video, so not sure what is happening.
@GauravSrivastava2609
@GauravSrivastava2609 2 года назад
Hello Sir, In angular While generating component Through ng g c compname Showing nothing to be done.....any suggestions
@ulissesparola4668
@ulissesparola4668 2 года назад
Valeu!
@dineshkalva3884
@dineshkalva3884 2 года назад
Great video. Required your help please...At video - 28.18, I'm getting error running the selected code generator: 'Package restore failed. Rolling back package changes for InspectionAPI". Could someone help me please.
@smsoni1383
@smsoni1383 2 года назад
Awesome
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks!
@tysonfury3168
@tysonfury3168 2 года назад
Anyone has an error on 1:02:00? I get error TS2339: Property 'item' does not exist on type "xComponent". Help please!
@mohammedabuoudah4813
@mohammedabuoudah4813 2 года назад
thank you for your great tutorial ..... but I am working with an older version of visual studio and when I run the code, swagger doesn't open since it needs a subscription and things like this, is there an alternative way to be sure that I made everything right ????? and thank you
@cicerofoscarini8890
@cicerofoscarini8890 2 года назад
very nice tutorial! thank very much. just a question: on 01:01:15... was it a fart? o.0
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Thanks for watching. I'm not sure what the noise was.
@burnoutenjoyer
@burnoutenjoyer 2 года назад
what color theme do you use during the video?
@aricase3826
@aricase3826 2 года назад
My "Show Inspection Types" button doesn't launch the modal. I'm using Bootstrap 5 as well but I installed it using NPM as opposed to CDN. Do you know what I'm missing?
@jamesschneider8677
@jamesschneider8677 2 года назад
I'm not sure. Do you have your code hosted anywhere? I could take a look.
@aricase3826
@aricase3826 2 года назад
@@jamesschneider8677 I don't unfortunately, I've been following your tutorial word for word. I was wondering if I needed to include a click event or something.
@jamesschneider8677
@jamesschneider8677 2 года назад
@@aricase3826 It sounds like it has to do with NPM. Did you just do NPM install bootstrap, or did you also import the JavaScript? One thing you could try if you haven't already, is to use the CDN. If it works, you'll know something went wrong with the JavaScript bundle and NPM.
@bekirferhatbegovic5332
@bekirferhatbegovic5332 2 года назад
Hi James, when I use ngFor i dont get error but instead of that data from db is not showing , i checked my inspectionApiUrl string which gave me 404, any hint?
@bekirferhatbegovic5332
@bekirferhatbegovic5332 2 года назад
CORS error ?
@imheretosleep
@imheretosleep 2 года назад
Hey, sorry to ask this but can someone explain how did the inspectionTypeId got related within the database. Did the Entity Framework did the job behind the scene? Once again I'm sorry for my dumb question hope you can enlighten me.
@jamesschneider8677
@jamesschneider8677 2 года назад
Yes, Entity Framework Core did this. You can watch the part at 8:08 where I mention that. Entity Framework Core does a lot behind the scenes. This can be good and bad, depending on the use case.
@JP-td8gt
@JP-td8gt 2 года назад
Sometimes i wish angular and api building had a drag and drop wizard properties to simply it all. Sighs. I’m new to this but it’s so overwhelming, i get to a point where I question if I really want to do this or not. Deep down I do want to learn this but there’s so many moving parts you gotta manually build out and keep track of
@juleswinnfield9931
@juleswinnfield9931 2 года назад
Learn VB if you wanna be a lazy programmer. As it is .NET does so much for you already and now you want it to do even more? Maybe you shouldn't program if this is your mentality already?
@JP-td8gt
@JP-td8gt 2 года назад
@@juleswinnfield9931 What a shitty response. You completely failed to see my point in question. I bet you’re no fun to be around nor work with.
@isaaclima3843
@isaaclima3843 2 года назад
Is it just me? Close your eyes and imagine you are being taught by MCUs Dr Hulk lol
@chiragmewada6679
@chiragmewada6679 2 года назад
Good work!
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks!
@billy8461
@billy8461 2 года назад
this is exactly what i wanted but i cant follow it because i am getting the following error in the migration files: 'DataContext is a name space but it is used like a type' (this line: [DbContext(typeof(DataContext))]) Any ideas?
@billy8461
@billy8461 2 года назад
nvm i fixed it
@FishJokes
@FishJokes Год назад
It feels like the last 40 minutes of the tutorial you just stopped really explaining what you're doing and started mostly reciting the code that you're writing. The whole forms part is very confusing how it ended up working
@gladisxavier2430
@gladisxavier2430 2 года назад
when click Add inspection shows 400 error pls help to resolve this problem
@josbexerr5166
@josbexerr5166 2 года назад
saludos Mister James, gracias por el tutorial, seria muy amable de activar los subtitulos
@jamesschneider8677
@jamesschneider8677 2 года назад
Saludos. Normalmente RU-vid lo hace automáticamente. No sé por qué no funcionó esta vez. No veo una opción para activarlos. Pero tengo planes para grabarlo en español también.
@vmh3224
@vmh3224 2 года назад
@@jamesschneider8677 gracias por sus videos profesor, en español estarian excelentes, saludos
@OlegWin355
@OlegWin355 2 года назад
Thank you great video! How much time did it take you to create this course?
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome! It took a while because I wanted it to be easy to watch and follow along. I didn't measure, but I researched some things and practiced the project a couple of times before recording and then editing. I'm glad you enjoyed it.
@OlegWin355
@OlegWin355 2 года назад
@@jamesschneider8677 yes, thank you for all your time and effort
@disguisedgirl
@disguisedgirl 2 года назад
Hi, Thanks for your great tutorial! I was checking your Angular git repo and found it different from your video code. Would you push the Angular project of this video? Also, I was wondering how you are resetting the form showing here 1:57:02?
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome! I'm glad you enjoyed it. I created a new repo. This should be the same one from the video: github.com/james-schneider/angular13-inspection-app - For resetting the form, do you mean after submitting?
@disguisedgirl
@disguisedgirl 2 года назад
@@jamesschneider8677 I've run your both project using VS Code and your projects are absolutely fine and the form resetting is working. Yes, I meant the form reset after submission. How is it happening if you could just explain in your project because I could not find any form reset logic. May be I am missing something. By the way, I've a small fix for you. I was trying to add a colored Bootstrap table header for better UX and need to change the tags like this table>thead>tr> th. Your code is missing the tr before the th and the colored header was not working in app/inspection/show-inspection/show-inspection.component.html So that right table would be Id Inspection Type Status Comments Options Another tip for you. Instead of using svg for Bootstrap icons, better using the icon tags for better code readability. Like this npm install --save bootstrap-icons And add follow line to style.css file: @import "~bootstrap-icons/font/bootstrap-icons.css"; And use icons like that(just example):
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you for catching that about the table row. And you're right about the readability of the icons versus svg. For the form, every time the modal is opened to add an inspection, the form will be blank because of the modalAdd() method inside show-inspection.component.ts: modalAdd() { this.inspection = { id:0, status:null, comments:null, inspectionTypeId:null } this.modalTitle = "Add Inspection"; this.activateAddEditInspectionComponent = true; }
@disguisedgirl
@disguisedgirl 2 года назад
Thanks! I would like to know how to show the Inspection type text in the select option value instead of showing the number and also set the first inspection type as default in it showing @2:07:37 .
@jamesschneider8677
@jamesschneider8677 2 года назад
@Disguised Girls, one thing that you can do that I didn't include in the video is make a small change to InspectionsController.cs. Add Include("InspectionType") before ToListAsync(); in the get call. Change that method to look like this: // GET: api/Inspections [HttpGet] public async Task GetInspections() { return await _context.Inspections.Include("InspectionType").ToListAsync(); } This will give you access to the inspectionType (name and id) in the API call instead of just the inspectionTypeId with a null inspectionType. You'll be able to access the inspectionName with inspectionType.inspectionName. Then you can display that in the UI where appropriate. But don't think I would want to show the first inspection type (or name) as a default when you are editing a form (@2:07:37), because then the form could potentially display something that wasn't originally there. For example, if the inspection was originally on the first floor, but the basement is the default option, you could open the form to edit a comment and not change the inspection type back to the original. Or maybe I'm not understanding your question?
@QuanHuyTran-nj5tw
@QuanHuyTran-nj5tw Год назад
tks bro!
@braco0000
@braco0000 2 года назад
Having seen the video, and considering what you say at 37:50, it Would be great if you upload a short video showing how to add routing to a "not-routed" project.
@jamesschneider8677
@jamesschneider8677 2 года назад
I'll try to do that soon.
@jamesschneider8677
@jamesschneider8677 2 года назад
@Fran Ariza - As requested: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9Sv0DVR3C8k.html
@abdouyousrif1377
@abdouyousrif1377 2 года назад
great video tutorial.
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you!
@mustafazeren4950
@mustafazeren4950 2 года назад
Hello James. Firstly thanks for this course. But i had a problem and i did not found the solution. In 1:03:37 , i had get this error code and i can not see the values on my table. (i can see the headers.) Can't bind to 'ngForOn' since it isn't a known property of 'tr'. My codes like as yours. Thank you, have nice days.
@madalinaciucioiu8934
@madalinaciucioiu8934 2 года назад
Did you somehow found a solution?
@wahyuaryapambudi9468
@wahyuaryapambudi9468 2 года назад
nice
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you
@hasi2694
@hasi2694 2 года назад
can we create Models in a separate Model folder?
@kunaljaiswal2025
@kunaljaiswal2025 2 года назад
Sir Dotnet ef database update Instance specific error comes
@Ahmet_Altun
@Ahmet_Altun 2 года назад
Thank you for this content.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome.
@tlearner
@tlearner 2 года назад
hello sir the update method giving me this id not found error
@hhcruz1999
@hhcruz1999 2 года назад
Thanks for the video. Can you add role based authentication video where roles are stored in the database. Authenticate using web api and angular. Or can you suggest a method to learn it. Happy new year and all the best
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome. Your video suggestion is on my list. I'll be on the lookout for a good learning resource for you in the meantime. Happy new year to you too.
@michaszura8940
@michaszura8940 2 года назад
I just did that in my api. My proposal is to focus on JWT (token) authentication, where you create roles table and user tables in database (you must take care of data context update). Then, for registration a user, you must create a form and POST data to the newly created controller. Afterwards, when logging in procedure is made, token has to be generated (based on credentials send. Email and password e.g.). Token has to be passed back to the fronted where can be stored in local storage of browser. That my proposal ;) it works and there is a lot of tutorials for that way.
@hhcruz1999
@hhcruz1999 2 года назад
@@michaszura8940 can you share if you used any extra study materials like websites
@dougrosenberg2361
@dougrosenberg2361 2 года назад
i've got an error 'at 1:36:00, error TS2339: Property 'type' does not exist on type 'AddEditInspectionComponent.' perhaps this is because i'm using angular 14 and i believe there is a difference with strictly typed forms...great video, thanks in advance!
@dougrosenberg2361
@dougrosenberg2361 2 года назад
nevermind! fixed it after proofreading for 2 hours. don't make fun of me!
@jamesschneider8677
@jamesschneider8677 Год назад
Glad you figured it out!
@ongoviet6674
@ongoviet6674 Год назад
@@dougrosenberg2361 how did u fix it? can u share me the solution pls
@kamalrajesh2332
@kamalrajesh2332 2 года назад
Does this tutorial cover two way binding?
@jamesschneider8677
@jamesschneider8677 2 года назад
I don't speak a lot about it in this particular video, but I do use it with ngModel. I'm planning to make a video about Angular directives, which will include two-way binding.
@franciscoaguirre2237
@franciscoaguirre2237 Год назад
Hi, how do I name my default connection string if I do not use sql express but sql server 2019. Is this the right? "DefaultConnection": "server=localhost\\MSSQLSERVER;database=inspectionapidb;trusted_connection=true" Thanks in advance. Great content. You have a new subscriber.
@lorenzovarese9024
@lorenzovarese9024 Год назад
"Server=NAME;Database=DBHERE;Trusted_Connection=True;TrustServerCertificate=Yes;" In my case I've needed TrustServerCertificate=Yes; at the end in order to get things working (NAME -> SELECT @@SERVERNAME )
@franciscoaguirre2237
@franciscoaguirre2237 Год назад
@@lorenzovarese9024 Thank you Lorenzo 😉
@joshirahul9196
@joshirahul9196 2 года назад
Hi James, Great tutorial. But in getInspections API although we have a foreign key (inspectionTypeId), we are not getting value in inspectionType property (I am getting null). How can we get the inspectionType values also in the same api? (Maybe if we can write some sql queries to join the tables)
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks! Yes, there are various ways you can handle that. I added the inspection type in the model as an Entity Framework navigation property to have an easy way to create a foreign key constraint with the inspectionTypeId, and I didn't want to put the inspection type in the Inspections table. That's why it's showing up in the API call as null. You could make it part of the UI (or do it behind scenes) and send that data to the API when creating and updating inspections. That way, when you call getInspections, the inspectionType values would be there instead of showing null. But if you do that, then it would probably make sense to add an additional field in the Inspections table if you want the data to persist there. Writing some SQL to join those tables might accomplish it for you as well. I don't think there is one "right" way to do it.
@jamesschneider8677
@jamesschneider8677 2 года назад
@Rahul Joshi, if you are still working on this. An easy fix would be to change the the get call in InspectionsController.cs by adding the .Include("InspectionType") before .ToListAsync(); It would look like this: // GET: api/Inspections [HttpGet] public async Task GetInspections() { return await _context.Inspections.Include("InspectionType").ToListAsync(); } Then Inspection Type won't be null
@kamalrajesh2332
@kamalrajesh2332 2 года назад
Sorry I am new to coding. Is this MVC pattern?
@jamesschneider8677
@jamesschneider8677 2 года назад
This is a web API with an Angular front end. Angular is more MVVM than MVC. Here is a site that speaks about web API vs MVC: www.c-sharpcorner.com/UploadFile/2b481f/difference-between-mvc-and-web-api/
@canal-do-eb
@canal-do-eb 2 года назад
for more videos like that
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks for watching.
@usmanAli-hw5xu
@usmanAli-hw5xu 2 года назад
super . sir pleas make tutorial on master detail crud with angular + dotnet core.
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you for the request
@usmanAli-hw5xu
@usmanAli-hw5xu 2 года назад
@@jamesschneider8677 you are super kind. who help the beginner to become pro developer . thank you very much sir
@kunaljaiswal2025
@kunaljaiswal2025 2 года назад
Sir my modalEdit not working
@E243-v7n
@E243-v7n 2 года назад
Hi, Good video! Am I the only one that the Program.cs file look different than the one in the video? In my program.cs class, I only have the main method and "CreateHostBuilder" method.
@RAvinderNathan2008
@RAvinderNathan2008 2 года назад
You are not using .net 6 most probably 5.
@nugzari939
@nugzari939 2 года назад
I know .net 6 does indeed confuse when u are used to program and startup classes. But even if the versions are different, if u add program and startup file with default settings, you should be able to use them.
@abhishekupadhyay6065
@abhishekupadhyay6065 2 года назад
Brother your topic is good....but picture quality is very bad....we are not able read properly....unable to improve the Quality
@jamesschneider8677
@jamesschneider8677 2 года назад
Thanks for watching. I recorded in HD. Others aren't having the issue you described.
@mohammadhasnain-mq5wu
@mohammadhasnain-mq5wu Год назад
dotnet ef migrations intialAdd is not working
@jcflorin6122
@jcflorin6122 2 года назад
Hi James, Thank you and I'm enjoying the lesson but Im kinda stuck with this error on inspect element. could it be I installed a new version of angular? Failed to load resource: net::ERR_CONNECTION_REFUSED :7115/api/inspections:1 ERROR HttpErrorResponse core.mjs:6485 ERROR HttpErrorResponse
@cifz
@cifz 2 года назад
@jamesschneider8677
@jamesschneider8677 2 года назад
I'm glad you enjoyed it.
@KarthikE-j3k
@KarthikE-j3k Месяц назад
😊
@nadendlasuryaanand1201
@nadendlasuryaanand1201 2 года назад
life is life la laa - la la la bruh
@jemisArt
@jemisArt 2 года назад
webapi doesnt connect to sql
@nelsonrivers8546
@nelsonrivers8546 2 года назад
What about deployment to IIS 10.0 ? What about Security ?
@jamesschneider8677
@jamesschneider8677 2 года назад
Thank you for watching. Those are good next steps.
@nelsonrivers8546
@nelsonrivers8546 2 года назад
@@jamesschneider8677 Will you be adding videos for those 2 topics ?
@neko2403
@neko2403 2 года назад
hi sir, could you please share a link to the github with this project?
@jamesschneider8677
@jamesschneider8677 2 года назад
.NET Web API: github.com/james-schneider/inspection-app-api
@jamesschneider8677
@jamesschneider8677 2 года назад
Angular 13 application: github.com/james-schneider/inspection-app
@74giannico
@74giannico 2 года назад
Thank you, great tutorial.
@jamesschneider8677
@jamesschneider8677 2 года назад
You're welcome! Glad you enjoyed it.
@borus_editz1259
@borus_editz1259 2 года назад
Could you please add some subtitles and try to upload with angular 10 & Web api
@jamesschneider8677
@jamesschneider8677 2 года назад
I can't add subtitles for some reason in this video. I wish I could. RU-vid normally does it automatically.
@tysonfury3168
@tysonfury3168 2 года назад
Can you do a login role based authorization?
@jamesschneider8677
@jamesschneider8677 2 года назад
I plan to. Finding the time has been the issue.
@NirdeshM
@NirdeshM 2 года назад
getting Error Number:67,State:0,Class:20
@jamesschneider8677
@jamesschneider8677 2 года назад
When did you receive this error?
@NirdeshM
@NirdeshM 2 года назад
@@jamesschneider8677 not sure why my reply has been keep on disappearing. happening when i run dotnet ef database update
@jamesschneider8677
@jamesschneider8677 2 года назад
@@NirdeshM - I'm not sure about that one. I don't think I had that error. Are you using .net 6 with all of the dependencies? If so, maybe closing out and opening Visual Studio will help.If that doesn't help, please check the source code to see if we have any differences: github.com/james-schneider/inspection-app-api
@TheNorthRemember
@TheNorthRemember 2 года назад
why not send the type name originally from the API and display it instead of the id !!
@jamesschneider8677
@jamesschneider8677 2 года назад
Because the primary key in one table is a foreign key in another. You can manage your data however you like.
@TheNorthRemember
@TheNorthRemember 2 года назад
@@jamesschneider8677 as long as you have navigation property you can use include(tableName) in the linq query and you can have access to the data with one call
@jamesschneider8677
@jamesschneider8677 2 года назад
@@TheNorthRemember Thank you. I will try that.
@youssefbaaziz3673
@youssefbaaziz3673 2 года назад
Can you enable subtitles please?
@jamesschneider8677
@jamesschneider8677 2 года назад
I can't enable them. RU-vid usually does it automatically, but it's not working for this video. I wish I could.
Далее
.NET Core 3.1 MVC REST API - Full Course
3:27:48
Просмотров 961 тыс.
СОБАКА И ТРИ ТАБАЛАПКИ😱#shorts
00:24
Next.js 15 Breakdown (Everything You Need To Know)
18:10
.NET 6 🚀 AutoMapper & Data Transfer Objects (DTOs)
15:48
ASP.NET Core Crash Course - C# App in One Hour
1:00:44
Просмотров 1,6 млн