I'm a junior developer at a large company. I've been trying to build on this very complex QA application for weeks and feel like a fool for not seeing how the pieces are fitting together, connecting DB to backend to frontend, etc. Your deliberate, explicit instructions are helping me to document the MVC process in my own code and on Miro. This video is really helping me for my career. Thanks, Tim.
While it is very evident that your quality of teaching is fabulous, your commitment and consistency in educating community of developers is amazing I know it requires a lot of efforts to produce such long videos with best quality that too consistently. We all appreciate your contribution sir. Hope you be known to whole dot net community. God bless :)
0:00 Intro 1:14 Project setup 4:25 Implementing employee sign-up form 12:00 Adding requirements to employee form 23:10 Making a quick form with html.EditorForModel() 25:28 Understanding how the employee form works in SignUp.cshtml 27:54 Handling the employee form in HomeController.cs 32:45 Creating the Employee table 40:00 Creating the EmployeeModel class in DataLibrary 44:00 Using Dapper to interact with the database 52:09 Implementing the EmployeeProcessor class to handle the business logic 59:39 Using the EmployeeProcessor class to store employee data 1:04:22 Displaying employee data by using the EmployeeProcessor class 1:12:44 Ending review
That is a great start. I know doing this time stamping is very time consuming but its a HUGE help to many students. If you get thru the rest of the video and capture the main topic timestamps, I will gladly add it to the video. Thank you for making a significant contribution to the community.
@@IAmTimCorey Thank you Tim, you have given me the motivation to finish this. And thank you for making great content, I just started learning C# and MVC and your videos have helped me out a lot with understanding how this all works.
I can’t begin to tell you how helpful your videos are, in just over an hour you’ve helped me understand what it’s taken me all week at work to wrap my head around. I have so much of your content bookmarked. Thank you so much Tim
For those of you who are having issues with your database, here's some advice (after 1 week of listening to this video over and over again): -> When you update your DB, make sure to publish it again -> Put your Database and DataLibrary in the same folder as the MVC project to make things easier. -> ConnectionString should be the exact DB that you're using. Make sure you copy and paste it right too. -> Make sure when you call your DB, to tripple check the spelling (ex. dbo.Users not dbo.User) -> Also, you might get errors using a Database named called "dbo.User". If so, either rename it or use "dbo.[User]" to fix your problem. Good luck everyone! Google your mistakes and dont be afraidto try again and again on your project.
I can't thank you enough Tim. I have been struggling for over 2 weeks to find how to do this, and you saved me! Thank you very much. Love you! Subscribed.
I am having an issue with the LoadEmployees method in the employeeprocessor. my error is inconsistent accessibility and it claims that the return type is less accessible than the method. can you help me?
@Garrett Sullivan From memory, I had the same problem. It was because the EmployeeModel class in the Models folder in the DataLibrary folder was not set to public.
@Garret Sullivan Thanks so much for asking this question! I was experiencing this too! @@James-zr1lu Thanks so much for the answer! helped tremendously!
public static int SaveData(string sql, T data) { using (IDbConnection cnn = new SqlConnection(GetConnectionString())) { return cnn.Execute(sql, data); } } Hi, Thanks for the tutorial. I have tried to run the solution like at 1:02:38 but it gives me error on line "return cnn.Execute(sql, data); " saying that there is an Incorrect syntax near 'value'. The break point does not get hit. How can I resolve this?
For future people, sounds like you miss `s` on the `values` there. Syntax for SQL Insert would be INSERT INTO your_table(column_name) VALUES (column_name_value) So with this in mind, in this case it would be INSERT INTO dbo.Employee(EmployeeId, FirstName, LastName, EmailAddress) VALUES (@EmployeeId, @FirstName, @LastName, @EmailAddress) It's recommended to look into SQL syntax and educate yourself on SQL injection to understand these.
I know this doesn't have to do with the content of the video, but I love how you handle the audio in your videos. I feel like I get to the end of your videos and it feels like only 10 minutes have passed while other lecturers drone on for hours and it really feels that way because you can hear a constant buzzing in the background or every spit wad in their mouth. Thank you for creating such cleanly edited and planned out videos. Looking forward to your content always.
I'm getting the error "System.NullReferenceException: 'Object reference not set to an instance of an object.'" @ 11:48. I have copied everything exactly as in the video. I have also run the source code and still get the same problem. My only difference is that I'm using the latest Visual Studio 16.7, .NET Framework 4.7.2. May the problem may lie there? There are others in the comment section that are having the same problem with no solution. Thank you
I think maybe you created a different form, maybe an Edit form instead of a create. I just recreated this in a new project in Visual Studio 2019 (16.7.2) with .NET Framework 4.7.2 and it worked as I demonstrated in the video.
@@IAmTimCorey That can't be it because I also tried using the source code that you provided via the download link in the description. We are using the exact same code yet producing different outcomes. At least I have a work around as I provided above.
Hi James. I also have been struggling with the exact same issue as you. I have managed to find a solution. I had placed the connection string into the wrong Web.config file. @ 39:14 Check that you have the connection string in the correct Web.config.
@@IAmTimCorey Mr Corey, I really enjoyed the tutorial but I did not initially see that there were two Web.config files and I placed the connection string in the Web.config inside the views folder. Just some feedback
To be more specific you must do the following: Right-click on References and click on Add Reference. In Assemblies, select System.Configuration and click OK.
More then 2 year ago i had to stop developing and begin learning and maintaining solutions build in ssis, stored procedures using functions, triggers the whole lot.. . Recently I’m starting to develop again. Your videos has help me a lot getting back into development, thank you. You’r for sure one of the better trainers i have found, keep up the good work.
Hi Tim, I receive an error at around 59:15 when entering "LoadEmployees" ( ruclips.net/video/bIiEv__QNxw/видео.html ). Visual Studio states Code CS0050. Inconsistent accessibility: return type 'List' is less accessible than method 'EmployeeProcessor.LoadEmployees()'. I'm a beginner in C# coming from a PHP background. I understand the main concepts thanks your gifting in teaching. :) But is anyone having this problem? If so, how do I resolve it as I can't load the page. I followed along every step of the way. Thank you for your help.
That message means that you missed adding "public" to one of your properties or classes. My guess is that the List is not set to public. If not that then the EmployeeModel is not set to public.
@@IAmTimCorey , Hi Tim, Thank you for the reply. I'm very grateful and appreciative that you took the time to respond. I'll check when I'm back at work Monday. I think I checked the public settings but I'll check again and perhaps I'll go through the tutorial on my home computer too. I really like your teaching as you encourage others to write the code step-by-step and this is one of the best ways to learn. I pray the blessings from Numbers 6:24-26 upon you and your family: “‘“The Lord bless you and keep you; 25 the Lord make his face shine on you and be gracious to you; 26 the Lord turn his face toward you and give you peace.”’
@@IAmTimCorey Ran into this too. I missed setting the DataLibrary.Model.EmployeeModel class to public. The error VS gives, and the help in the docs is not very useful.
@@mamahumen I had the same problem, I fixed it by going into the "EmployeeModel" class in the "Models" folder, and making the class public. My line 9 now says "public class EmployeeModel" and I no longer have the error.
This video was great for me, because I had a hard time understanding how MVC design worked. You also helped me understand validation and model binding as it relates to Model state. You rock Tim Corey!
Hi Tim thank you for your tutorials, fantastic work. I've ran into an exception on final test run at the SqlDataAccess. return ConfigurationManager.ConnectionStrings[connectionName].ConnectionString;... System.NullReferenceException: 'Object reference not set to an instance of an object.' - Hard to diagnose from three lines but do you have any thoughts? Thanks
Strange as it may sound - this video is symphony. I followed each line of code by coding it in parallel in VS2019 - taking time to savour the notes of logic, the melody of the architecture and the rhythm of the underlying logic as the whole application came together like a musical crescendo. Life is good.........!
Very good guy your explanation of the subject! I was looking for several days without finding an article that showed and commented as well as his video. Congratulations! It helped me a lot to clarify doubts. Muito boa sua explicação do assunto cara! Passei vários dias procurando sem encontrar um artigo que mostrasse e comentasse tão bem quanto seu vídeo. Parabéns! Me ajudou muito a esclarecer dúvidas.
AWESOME FRIGGIN TUTORIALS DUDE . . . YOU EXPLAIN IT SO CLEARLY AND WITH EASY EXAMPLES INSTEAD OF GOING OVER OUR HEADS . . . AND DON'T WASTE ANY TIME BEFORE JUMPING INTO THE CODE. LOVE IT MAN, I WANT TO SIGN UP FOR YOUR COURSES AND MENTORSHIPS STUFF REALLY BAD BUT IM KIND OF POOR RIGHT NOW.
I loved the vid ... i bought a udemy course for this and it was terrible... the teacher was saying this is beyond the scope of this course but u can find it in my other udemy course...and that happended multiple times...it was really hard to understand what he was doing...and not even close to this way of coding...thank u so much for your great work ....I actually have a task to complete in order to get a job as .Net dev and this helped a lot...thank u so much...I will consider buying one of ur courses but when I get the job...bc a bit expensive ...but it is worth it bc of the great material and great way of teaching...again thank u and u won a new subs and supporter 😊
Awesome video! I learned so much more today even having programmed in ASP/VB.NET Web Forms for over 10 years. Your MVC video was incredible as well. Soon I will be adding MVC5 to my resume!
Thanks, Tim, was a great video, def better than my last coach. Had multiple errors, but I handled them like a champ, and the comment section helped a lot. Looks like its better if I learn some SQL before I continue with ASP.net
@@IAmTimCorey Hey just trying to extend on the content, do I need to create individual save load classes in dataaccess proj. I feel like my program is loading fom multiple forms automatically and getting stuck at dbaccess
For those struggling with an error saying "System.NullReferenceException: Object reference not set to an instance of an object", check that your connection string is in the CORRECT web.config file. It SHOULD be in the Web.config below packages.config and Global.asax in your MVCApp project, NOT the one under views, shared, Web.config. This solved my problem =) Hope this helps those who are struggling, because I sure as hell nearly pulled my hair out hahaha
Mine was already in the correct web.config folder, but thank you for the advice. Tim said in another comment, that a class or a variable needs to be instantiated. I copied his code line for line (Or so I thought) and I still can't find it... Again, thank you for the advice
Tim, I'm starting to make the move from web forms to MVC for a pretty big project and have read a couple of books and seen a few video tutorials (including one on Channel 9), this is the clearest explanation yet of how MVC works and how to actually get it to do something. Thank you!
37:14 Dear Tim, I love your videos! it helped me a lot to improve myself (4 year programmer), you said as a rule dont use password as plain text into you db, which I fully aggree, but you just explaind why not to do it, and not how to do it correctly (with somekind of guid or hashing) Would really love of you to make a video of authantication on MVC.
Use a system like Microsoft Identity (I use it in the TimCo Retail Manager series and a couple other videos). The big thing is to not design your own system.
Minor adjustments to existing time codes. Credit to Jack Fitzgerald 0:00 - Intro 1:13 - Creating ASP .NET Framework app 4:35 - Adding MVC data Model 6:20 - Sign-up form: new MVC Controller action and View with "create" template 12:56 - Signup-form configuration and validation: data Model annotations 23:41 - Crude sign-up form: Html.EditorForModel() 25:27 - Sign-up from code walkthrough 27:53 - Posted data validation: Controller POST action 32:43 - Posted data storage: Database table design 38:15 - Posted data storage: Database connection string 40:00 - Data Model for database 43:39 - Data access with Dapper 52:09 - Data access Business Logic 59:40 - Storing posted data in Database 1:04:39 - Accessing and displaying data from database. 1:12:44 - Summary and concluding remarks
@@IAmTimCorey am trying to move from using webforms to MVC and am wondering is it dangerous to put our query in the controller or its ok you just put them in the logic to make it more universal ? by the way you explain everything better than my university's web dev instructor i have been watching this on repeat for like ten times lol greatly appreciated
Really useful Tim, thank you. I understand it now (I think). I had an issue, but found it. This is absolutely wonderful. You are doing really great work, and I am supporting you through your Patron page.
Love your classes Tim, really good, great depth and not to focused on stuff. Its also easy to have you on monitor2 while i do your class on monitor1 in my studio. Super thanks. BR
One more fruitful productive morning .. Excellent dear Mr. Tim.. Very clear, neat and upto the mark.. I am getting confidence to work on my entity framework web application that is going to start right from tomorrow :-)
34:00 Adding the IDENTITY specifier when creating table is important, because it tells SQL server to assign auto increment id whenever new entry is added to the Employee Table. I missed that part and spent some time to figured that out.
I could manage to confirm what yuo teach us. Really great tuto! everything worked fine for me, and I could learn a lot watching your excelent way to drive all the stuffs and concepts in a very concrect mode. Thnks a lot.
Thanks for the video Tim, I recently got a VB6 to Web project dumped on me, being mostly a desktop programmer I was lost on what to do. This video made it clear that MVC was the way to go. Thanks so much.
Good video Tim, thanks. It`s also worth mentioning, that the Id of the Employee table (PK), supposed to be set IsIdentity to yes and also enable identity increment ( mine was defaultly set to false ).
I didn't point it out (and I should have) but at 33:58, I add "IDENTITY" at the end of the ID column. That sets it up to be an identity column with an auto-increment value of (1,1).
Tim your channel is an absolute goldmine of programming knowledge. It amazes me how well you relate all your coding to the higher level programming concepts you aim to explain. I have used your MVC videos to introduce myself to the field of web development. Because of you I am confident in creating a simple website using MVC and am now looking to expand my horizons. However I have encountered an problem. There seems to be so many directions to go from here, and I'm struggling to figure out which are most relevant and useful to me. My question to you is, for someone interesting in web development, who has a solid understanding of OO principles, SQL and front end design langauges (css, javascript, html) yet has only started to combine them using platforms like MVC, what are the next steps to take?
I would look at .NET Core, and specifically Razor Pages (here is a video: ruclips.net/video/68towqYcQlY/видео.html ). Then, start practicing. Build test projects and learn how the pieces fit together.
Great video! I did miss a lot of logic of the methods and the classes and didn't really understand what does what exactly but just like you intended, this video is great for understanding the whole process and the bigger picture!
Great video as always thanks. But a little late :-) I just finished my first MVC app for a client today using your old video (Introduction to ASP.NET MVC) and some Google Foo, i think this video would have saved me about one day of work :-) Now instead I have some refactoring to do....
Hey Tim, could you do a video on attributes/pre-processor directives? Having trouble with that topic, use-cases, when to use them, where the standard library attributes apply, etc. Your videos are great, I always look forward to new ones popping up in my notifications, thanks!!
I'm new to the C#/.NET ecosystem (coming in from Node.js development). A possible video recommendation would be an Intro to C# Web Development for Node/JavaScript Developers, including comparing and contrasting the benefits of each. I think Node has a lot of hype behind it and is the cool thing nowadays, and a lot of developers have gone through college never even knowing about C#/.NET and only hearing about it in jokes about how it's old and outdated. But having worked with both ecosystems now, I'm starting to see serious benefits and advantages in the C#/.NET ecosystem that alot of the Node devs would appreciate, but they've just never bothered to learn about/ never been taught because everyone just follows whatever the hype is. Especially now with .NET Core, the ecosystem is moving in a very good direction.
I know that my questions might be a bit late, but I would really appreciate if you could explain me something. Isn't it more convenient just to use Entity Framework for the Data Access instead of typing the Data Library by your own? What's the difference between these 2 approaches? And where exactly was Dapper used? It seems like you have mapped the data between 2 models manually, isn't it?
35:20 "That limit is a maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters. However, there is a restriction in RFC 2821 on the length of an address in MAIL and RCPT commands of 254 characters."
Interesting. There used to be exceptions (I believe for Arabic and one other character set) that greatly increased the length but I don't see those anymore. Good to know.
You should get it within minutes. Some email providers block zip files with source code inside. If that happens, email me at help@iamtimcorey.com and I will get the file to you a different way.
It is a newer standard in SQL and not one strictly enforced (yet). Trying to get in the habit but it is hard to retrain decades of doing it a different way.
Not sure about EF but I did do a datagrid tutorial in WPF already. That should show you what you need to wire up EF or Dapper or whatever ORM you have to the datagrid.
@@IAmTimCorey i saw that but still feel i doing something wrong or at least their is a better way than the one i use specially when it come to multi-select then add/edit/delete them to the database with mvvm
Any chance you can do something like "Entity Framework (Db 1st and Code 1st with migrations) + ASP.NET MVC In Depth" series?, showing stuff like Eager and Lazy loading... 1 to 1, 1 to many relationships and stuff like that will be GREAT!
That's a firm maybe. I'm not a big EF guy (I really don't like it for most situations). I've been considering it for the new EFCore stuff since that is so much faster than EF.
I'm a junior developer at a large company. I've been trying to build on this very complex QA application for weeks and feel like a fool for not seeing how the pieces are fitting together, connecting DB to backend to frontend, etc. Your deliberate, explicit instructions are helping me to document the MVC process in my own code and on Miro. This video is really helping me for my career. Thanks, Tim.
Thank you!
While it is very evident that your quality of teaching is fabulous, your commitment and consistency in educating community of developers is amazing
I know it requires a lot of efforts to produce such long videos with best quality that too consistently. We all appreciate your contribution sir. Hope you be known to whole dot net community. God bless :)
I appreciate the kind words.
0:00 Intro
1:14 Project setup
4:25 Implementing employee sign-up form
12:00 Adding requirements to employee form
23:10 Making a quick form with html.EditorForModel()
25:28 Understanding how the employee form works in SignUp.cshtml
27:54 Handling the employee form in HomeController.cs
32:45 Creating the Employee table
40:00 Creating the EmployeeModel class in DataLibrary
44:00 Using Dapper to interact with the database
52:09 Implementing the EmployeeProcessor class to handle the business logic
59:39 Using the EmployeeProcessor class to store employee data
1:04:22 Displaying employee data by using the EmployeeProcessor class
1:12:44 Ending review
That is a great start. I know doing this time stamping is very time consuming but its a HUGE help to many students. If you get thru the rest of the video and capture the main topic timestamps, I will gladly add it to the video. Thank you for making a significant contribution to the community.
@@IAmTimCorey Thank you Tim, you have given me the motivation to finish this. And thank you for making great content, I just started learning C# and MVC and your videos have helped me out a lot with understanding how this all works.
I watch your tutorials few days in a row now. Speechless, you are the best teacher I ever seen.
Thank you!
You're an awesome instructor Tim.
Thank you!
I can’t begin to tell you how helpful your videos are, in just over an hour you’ve helped me understand what it’s taken me all week at work to wrap my head around. I have so much of your content bookmarked. Thank you so much Tim
I am glad it was so helpful.
For those of you who are having issues with your database, here's some advice (after 1 week of listening to this video over and over again):
-> When you update your DB, make sure to publish it again
-> Put your Database and DataLibrary in the same folder as the MVC project to make things easier.
-> ConnectionString should be the exact DB that you're using. Make sure you copy and paste it right too.
-> Make sure when you call your DB, to tripple check the spelling (ex. dbo.Users not dbo.User)
-> Also, you might get errors using a Database named called "dbo.User". If so, either rename it or use "dbo.[User]" to fix your problem.
Good luck everyone! Google your mistakes and dont be afraidto try again and again on your project.
Thanks for sharing. Great job sticking with it.
Getting addicted to watching your videos. Love your voice and how you pay attention to all the little details. Thank you
You are most welcome. Thanks for watching.
Thanks .. is there a .Net Core version?
I can't thank you enough Tim. I have been struggling for over 2 weeks to find how to do this, and you saved me! Thank you very much. Love you! Subscribed.
Awesome!
I am having an issue with the LoadEmployees method in the employeeprocessor. my error is inconsistent accessibility and it claims that the return type is less accessible than the method. can you help me?
@Garrett Sullivan From memory, I had the same problem. It was because the EmployeeModel class in the Models folder in the DataLibrary folder was not set to public.
@Garret Sullivan Thanks so much for asking this question! I was experiencing this too! @@James-zr1lu Thanks so much for the answer! helped tremendously!
Its great with the community helps each other out. The IAmTimCorey community members are some of the best!
@@James-zr1lu U Mad LAd
thanks @@James-zr1lu , save me a lot of time
Every time when I watch your Tutorials, I find the actual logic how people work in software Companies. Thanks for Amazing videos.
You are most welcome. Thanks for watching.
public static int SaveData(string sql, T data)
{
using (IDbConnection cnn = new SqlConnection(GetConnectionString()))
{
return cnn.Execute(sql, data);
}
}
Hi, Thanks for the tutorial.
I have tried to run the solution like at 1:02:38 but it gives me error on line "return cnn.Execute(sql, data); " saying that there is an Incorrect syntax near 'value'.
The break point does not get hit. How can I resolve this?
For future people, sounds like you miss `s` on the `values` there. Syntax for SQL Insert would be
INSERT INTO your_table(column_name)
VALUES (column_name_value)
So with this in mind, in this case it would be
INSERT INTO dbo.Employee(EmployeeId, FirstName, LastName, EmailAddress)
VALUES (@EmployeeId, @FirstName, @LastName, @EmailAddress)
It's recommended to look into SQL syntax and educate yourself on SQL injection to understand these.
I know this doesn't have to do with the content of the video, but I love how you handle the audio in your videos. I feel like I get to the end of your videos and it feels like only 10 minutes have passed while other lecturers drone on for hours and it really feels that way because you can hear a constant buzzing in the background or every spit wad in their mouth. Thank you for creating such cleanly edited and planned out videos. Looking forward to your content always.
I am glad you appreciate the audio quality. I do put a lot of effort into it (even though audio editing is not a skill of mine).
I'm getting the error "System.NullReferenceException: 'Object reference not set to an instance of an object.'" @ 11:48.
I have copied everything exactly as in the video. I have also run the source code and still get the same problem. My only difference is that I'm using the latest Visual Studio 16.7, .NET Framework 4.7.2. May the problem may lie there? There are others in the comment section that are having the same problem with no solution.
Thank you
Well, if I change return view() to return View(new Models.EmployeeModel()); for ActionResult SignUp() in the HomeController, then that works.
I think maybe you created a different form, maybe an Edit form instead of a create. I just recreated this in a new project in Visual Studio 2019 (16.7.2) with .NET Framework 4.7.2 and it worked as I demonstrated in the video.
@@IAmTimCorey That can't be it because I also tried using the source code that you provided via the download link in the description. We are using the exact same code yet producing different outcomes. At least I have a work around as I provided above.
Hi James. I also have been struggling with the exact same issue as you. I have managed to find a solution. I had placed the connection string into the wrong Web.config file. @ 39:14
Check that you have the connection string in the correct Web.config.
@@IAmTimCorey
Mr Corey, I really enjoyed the tutorial but I did not initially see that there were two Web.config files and I placed the connection string in the Web.config inside the views folder. Just some feedback
Hello Tim, this was the best MVC tutorial on youtube hands-down. This comes from someone who's been through tutorial-hell. Excellent job!
I am glad it was so helpful.
Is anyone else having trouble with the ConfigurationManager thing at around 46:45?
You can right click on references in the solution explorer and add System.Configuration manually.
Yep, TraktorFerguson is correct.
@@traktor207 Thanks. worked for me
To be more specific you must do the following:
Right-click on References and click on Add Reference. In Assemblies, select System.Configuration and click OK.
for me for some reason worked also adding into references System.Configuration.Install
I just want to say how thankful I am for all your videos. I hope you can add more videos related .net. Thank you again Sir.
You are most welcome. Thanks for watching.
Inconsistent Accessibility:return type 'List' it seems there is an error in the class privacy in the buisness logic
please help tim ..
It sounds like EmployeeModel is not marked as public.
@@IAmTimCorey Wow great! Thanks for the fast response sir Tim (bow)
how did you fix this issue ? I have already added the keyword public
More then 2 year ago i had to stop developing and begin learning and maintaining solutions build in ssis, stored procedures using functions, triggers the whole lot.. . Recently I’m starting to develop again. Your videos has help me a lot getting back into development, thank you. You’r for sure one of the better trainers i have found, keep up the good work.
Welcome back and thanks for looking to Tim for assistance.
Hi Tim, I receive an error at around 59:15 when entering "LoadEmployees" ( ruclips.net/video/bIiEv__QNxw/видео.html ). Visual Studio states Code CS0050. Inconsistent accessibility: return type 'List' is less accessible than method 'EmployeeProcessor.LoadEmployees()'. I'm a beginner in C# coming from a PHP background. I understand the main concepts thanks your gifting in teaching. :) But is anyone having this problem? If so, how do I resolve it as I can't load the page. I followed along every step of the way. Thank you for your help.
That message means that you missed adding "public" to one of your properties or classes. My guess is that the List is not set to public. If not that then the EmployeeModel is not set to public.
@@IAmTimCorey , Hi Tim, Thank you for the reply. I'm very grateful and appreciative that you took the time to respond. I'll check when I'm back at work Monday. I think I checked the public settings but I'll check again and perhaps I'll go through the tutorial on my home computer too. I really like your teaching as you encourage others to write the code step-by-step and this is one of the best ways to learn. I pray the blessings from Numbers 6:24-26 upon you and your family:
“‘“The Lord bless you
and keep you;
25 the Lord make his face shine on you
and be gracious to you;
26 the Lord turn his face toward you
and give you peace.”’
@@IAmTimCorey Ran into this too. I missed setting the DataLibrary.Model.EmployeeModel class to public. The error VS gives, and the help in the docs is not very useful.
Is there any answer to this?
@@mamahumen I had the same problem, I fixed it by going into the "EmployeeModel" class in the "Models" folder, and making the class public. My line 9 now says "public class EmployeeModel" and I no longer have the error.
This video was great for me, because I had a hard time understanding how MVC design worked. You also helped me understand validation and model binding as it relates to Model state. You rock Tim Corey!
I am glad it was so helpful.
I commend you for not even attempting to try to store passwords. I've stored passwords before and I never want to do it again.
Agreed.
these kind of overview videos are very necessary and underrated, I hope you keep implementing them
Thank you!
Hi Tim thank you for your tutorials, fantastic work. I've ran into an exception on final test run at the SqlDataAccess. return ConfigurationManager.ConnectionStrings[connectionName].ConnectionString;... System.NullReferenceException: 'Object reference not set to an instance of an object.' - Hard to diagnose from three lines but do you have any thoughts? Thanks
I'm getting the same error, did you fix it?
Strange as it may sound - this video is symphony. I followed each line of code by coding it in parallel in VS2019 - taking time to savour the notes of logic, the melody of the architecture and the rhythm of the underlying logic as the whole application came together like a musical crescendo. Life is good.........!
I am glad you found it so pleasing.
Would love to see more ASP.NET. Your doing such a great job. It's much clearer and better than courses in University.
More to come!
@@IAmTimCorey Sending emails and using Webforms would be great :)
Indeed this is much better than in University, worst in university such topics of MVC are not covered we only do C# and Desktop Apps if we are lucky
Big thumbs , one of best channel on youtube i ever found for .Net
Thank you!
I enjoyed the tutorial and learned a lot! I like your style of teaching, you explain everything. While others just assume we know things.
I'm glad you enjoyed it and that you found it valuable.
Very helpful to see the full stack like this, as to how all the pieces fit together.
Glad it was helpful!
Very good guy your explanation of the subject! I was looking for several days without finding an article that showed and commented as well as his video. Congratulations!
It helped me a lot to clarify doubts.
Muito boa sua explicação do assunto cara! Passei vários dias procurando sem encontrar um artigo que mostrasse e comentasse tão bem quanto seu vídeo.
Parabéns!
Me ajudou muito a esclarecer dúvidas.
I am glad it was so helpful.
AWESOME FRIGGIN TUTORIALS DUDE . . . YOU EXPLAIN IT SO CLEARLY AND WITH EASY EXAMPLES INSTEAD OF GOING OVER OUR HEADS . . . AND DON'T WASTE ANY TIME BEFORE JUMPING INTO THE CODE. LOVE IT MAN, I WANT TO SIGN UP FOR YOUR COURSES AND MENTORSHIPS STUFF REALLY BAD BUT IM KIND OF POOR RIGHT NOW.
I am glad you have found my content so helpful. The good news is that you can learn a ton for free.
I loved the vid ... i bought a udemy course for this and it was terrible... the teacher was saying this is beyond the scope of this course but u can find it in my other udemy course...and that happended multiple times...it was really hard to understand what he was doing...and not even close to this way of coding...thank u so much for your great work ....I actually have a task to complete in order to get a job as .Net dev and this helped a lot...thank u so much...I will consider buying one of ur courses but when I get the job...bc a bit expensive ...but it is worth it bc of the great material and great way of teaching...again thank u and u won a new subs and supporter 😊
I'm glad this video was so helpful.
Awesome video! I learned so much more today even having programmed in ASP/VB.NET Web Forms for over 10 years. Your MVC video was incredible as well. Soon I will be adding MVC5 to my resume!
Excellent!
Thanks, Tim, was a great video, def better than my last coach. Had multiple errors, but I handled them like a champ, and the comment section helped a lot. Looks like its better if I learn some SQL before I continue with ASP.net
I'm glad it was helpful.
Great video Tim. Exactly what I was looking for and straight to the point.
Thank you!
Nailed it Tim. Nice one. Just what I needed, someone who went through data connection without all the automation. You get from me an A++
Thanks!
@@IAmTimCorey Hey just trying to extend on the content, do I need to create individual save load classes in dataaccess proj. I feel like my program is loading fom multiple forms automatically and getting stuck at dbaccess
Another amazing ah ha tutorial. You have a great way of putting concepts into English and demonstrating with simple code. Thank you !
Excellent! I am glad it helped you out.
For those struggling with an error saying "System.NullReferenceException: Object reference not set to an instance of an object", check that your connection string is in the CORRECT web.config file. It SHOULD be in the Web.config below packages.config and Global.asax in your MVCApp project, NOT the one under views, shared, Web.config. This solved my problem =)
Hope this helps those who are struggling, because I sure as hell nearly pulled my hair out hahaha
Thank you for sharing this. I'm sure it will help others.
Mine was already in the correct web.config folder, but thank you for the advice. Tim said in another comment, that a class or a variable needs to be instantiated. I copied his code line for line (Or so I thought) and I still can't find it... Again, thank you for the advice
I much appreciate you this type of tutorial. Every person can understand and can fast learning. This is a really good tutorial.
Glad it was helpful!
Ive watch from the start until the End! Your such a good instructor❤️😍😍
Thank you so much!!
Why Are you such an amazing dude? I am always super excited to watch your videos even before going to bed
Glad you like them!
Tim, I'm starting to make the move from web forms to MVC for a pretty big project and have read a couple of books and seen a few video tutorials (including one on Channel 9), this is the clearest explanation yet of how MVC works and how to actually get it to do something. Thank you!
I appreciate the kind words. I'm glad you found it clear and helpful.
37:14
Dear Tim, I love your videos! it helped me a lot to improve myself (4 year programmer), you said as a rule dont use password as plain text into you db, which I fully aggree, but you just explaind why not to do it, and not how to do it correctly (with somekind of guid or hashing)
Would really love of you to make a video of authantication on MVC.
Use a system like Microsoft Identity (I use it in the TimCo Retail Manager series and a couple other videos). The big thing is to not design your own system.
A deep and warm "Thank you!" from the bottom of my heart! You are my man XD. No, really. Only your lessons made my way through.
You are most welcome. I'm glad they were so helpful.
Minor adjustments to existing time codes.
Credit to Jack Fitzgerald
0:00 - Intro
1:13 - Creating ASP .NET Framework app
4:35 - Adding MVC data Model
6:20 - Sign-up form: new MVC Controller action and View with "create" template
12:56 - Signup-form configuration and validation: data Model annotations
23:41 - Crude sign-up form: Html.EditorForModel()
25:27 - Sign-up from code walkthrough
27:53 - Posted data validation: Controller POST action
32:43 - Posted data storage: Database table design
38:15 - Posted data storage: Database connection string
40:00 - Data Model for database
43:39 - Data access with Dapper
52:09 - Data access Business Logic
59:40 - Storing posted data in Database
1:04:39 - Accessing and displaying data from database.
1:12:44 - Summary and concluding remarks
Thanks for the update!
@@IAmTimCorey am trying to move from using webforms to MVC and am wondering is it dangerous to put our query in the controller or its ok you just put them in the logic to make it more universal ? by the way you explain everything better than my university's web dev instructor i have been watching this on repeat for like ten times lol greatly appreciated
Really useful Tim, thank you. I understand it now (I think). I had an issue, but found it. This is absolutely wonderful. You are doing really great work, and I am supporting you through your Patron page.
I appreciate the kind words and the support.
Love your classes Tim, really good, great depth and not to focused on stuff. Its also easy to have you on monitor2 while i do your class on monitor1 in my studio. Super thanks. BR
Glad you like them!
One more fruitful productive morning .. Excellent dear Mr. Tim.. Very clear, neat and upto the mark.. I am getting confidence to work on my entity framework web application that is going to start right from tomorrow :-)
I am glad it was so helpful.
This was awesome. I am new to MVC and been struggling to wrap my head around it, but this has mad it very clear.. Thank you!
Awesome!
Thank you for your tuto! English/American isn't my native langage, but I hink I was understanding you at 95%.
Awesome!
34:00 Adding the IDENTITY specifier when creating table is important, because it tells SQL server to assign auto increment id whenever new entry is added to the Employee Table. I missed that part and spent some time to figured that out.
Thanks for highlighting it for others, I'm sure it will benefit them
I could manage to confirm what yuo teach us. Really great tuto! everything worked fine for me, and I could learn a lot watching your excelent way to drive all the stuffs and concepts in a very concrect mode. Thnks a lot.
You are most welcome. Thanks for watching.
Nicely demonstrated. Love the way you put it together. Thanks so much for the tutorial!!
Glad it was helpful!
Thank you Tim for this great tutorial! I really appreciate the also delivered valuable hints to methodology. This makes your videos first class.
Tim's goal is to educate, not just dump information on folks. I'm glad you can appreciate that.
Thank you so much Tim. I'm really looking forward to the Core video that might be in the works. This has been an incredibly timely and helpful video
Thank you!
Hi Tim, thank you for another great video.
You are most welcome. Thanks for watching.
Thanks for the video Tim, I recently got a VB6 to Web project dumped on me, being mostly a desktop programmer I was lost on what to do. This video made it clear that MVC was the way to go. Thanks so much.
You are most welcome. Thanks for watching.
Found this video immensely useful in 2020. Great Job, take my sub and gratitude!
Glad it helped!
Nice one! Another great mini tutorial from Tim Corey.
Thank you!
So many things to learn in just a video. Thank you very much!!!
You are welcome.
Great tutorial. Very helpful for my .NET module as part of BSc Computer Science Honours degree. Thank you 🤙🏼
I am glad it has been so helpful.
Good video Tim, thanks. It`s also worth mentioning, that the Id of the Employee table (PK), supposed to be set IsIdentity to yes and also enable identity increment ( mine was defaultly set to false ).
I didn't point it out (and I should have) but at 33:58, I add "IDENTITY" at the end of the ID column. That sets it up to be an identity column with an auto-increment value of (1,1).
It's the best one I have never seen, thanks Tim.
You are most welcome. Thanks for watching.
Outstanding video - easy to understand gives a usable example from which to build.
Thank you!
Tim your channel is an absolute goldmine of programming knowledge. It amazes me how well you relate all your coding to the higher level programming concepts you aim to explain. I have used your MVC videos to introduce myself to the field of web development. Because of you I am confident in creating a simple website using MVC and am now looking to expand my horizons. However I have encountered an problem. There seems to be so many directions to go from here, and I'm struggling to figure out which are most relevant and useful to me. My question to you is, for someone interesting in web development, who has a solid understanding of OO principles, SQL and front end design langauges (css, javascript, html) yet has only started to combine them using platforms like MVC, what are the next steps to take?
I would look at .NET Core, and specifically Razor Pages (here is a video: ruclips.net/video/68towqYcQlY/видео.html ). Then, start practicing. Build test projects and learn how the pieces fit together.
Great video! I did miss a lot of logic of the methods and the classes and didn't really understand what does what exactly but just like you intended, this video is great for understanding the whole process and the bigger picture!
Thanks!
This video was helpful and at a good digestible pace. Thanks!
You are welcome.
Super clean code, I love it.
Thanks!
Dude you are a lifesaver thanks for the valuable info.
You are welcome.
Great video as always thanks.
But a little late :-)
I just finished my first MVC app for a client today using your old video (Introduction to ASP.NET MVC) and some Google Foo, i think this video would have saved me about one day of work :-)
Now instead I have some refactoring to do....
Bummer. Sorry it didn't come out a bit quicker. Maybe next time.
Very informative Demo Thank you. You're a great influencer God bless you
Thank you!
You a hero Tim!
Also, a course on making a blog engine would be cool.
Thanks for the suggestion!
great explaination! i saw asp.net as a complicated framework but you explained it very well
subbed!
I appreciate the kind words.
Thank you for the very clear tutorial Tim! It helped me understand a lot!
Glad it helped!
This is a great tutorial. Easy to follow and implement. Thank you so much!
Thanks for watching!
Amazing videos. You made this easily understandable and explained it clearly. Keep up the good videos! :D
Thank you.
and as always, excellence!
Thank you!
Hey Tim, could you do a video on attributes/pre-processor directives? Having trouble with that topic, use-cases, when to use them, where the standard library attributes apply, etc. Your videos are great, I always look forward to new ones popping up in my notifications, thanks!!
Sounds like a good video topic. I'll add it to the list.
I'm new to the C#/.NET ecosystem (coming in from Node.js development). A possible video recommendation would be an Intro to C# Web Development for Node/JavaScript Developers, including comparing and contrasting the benefits of each. I think Node has a lot of hype behind it and is the cool thing nowadays, and a lot of developers have gone through college never even knowing about C#/.NET and only hearing about it in jokes about how it's old and outdated. But having worked with both ecosystems now, I'm starting to see serious benefits and advantages in the C#/.NET ecosystem that alot of the Node devs would appreciate, but they've just never bothered to learn about/ never been taught because everyone just follows whatever the hype is. Especially now with .NET Core, the ecosystem is moving in a very good direction.
Thanks, added to the list.
@@IAmTimCorey Awesome:)Thanks for all the incredible content!!
Nicely Explained. Great Video! Thanks Tim.
Thank you!
This is a fantastic guide, like all of your videos. Many thanks.
You are welcome.
Really helpful tips and simple teaching.
Thanks!
Thank you Tim - exactly what I needed!
You are welcome.
Thank you for holding to the "no plain text passwords in database" rule!
You are welcome.
Very Informative and beautifully explained video. Thanks a lot for this.
You are welcome.
thank you! you're the best "teacher"!
You are most welcome. Thanks for watching.
Just what I needed to access database. There are kind of articles out there but nothing comes close to it.
Thanks for watching and sharing
I know that my questions might be a bit late, but I would really appreciate if you could explain me something. Isn't it more convenient just to use Entity Framework for the Data Access instead of typing the Data Library by your own? What's the difference between these 2 approaches? And where exactly was Dapper used? It seems like you have mapped the data between 2 models manually, isn't it?
Thank you Corey
You are welcome.
This is awsome! Crystal clear! Thank you so much!
You're so welcome!
35:20 "That limit is a maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters. However, there is a restriction in RFC 2821 on the length of an address in MAIL and RCPT commands of 254 characters."
Interesting. There used to be exceptions (I believe for Arabic and one other character set) that greatly increased the length but I don't see those anymore. Good to know.
You make this tutorial simple and easy to understand. Thank You
By the way how long will it take to receive the Source code?
You should get it within minutes. Some email providers block zip files with source code inside. If that happens, email me at help@iamtimcorey.com and I will get the file to you a different way.
I am successful with this video. This is my first time doing web development. 😁
Excellent!
A lot of thanks, Tim Corey 🙏
You are welcome.
Hey Tim! Nice video. Many thanks!
I noticed you ended the sql query string with a semicolon at 56:23. I haven't seen you use that before? Why?
It is a newer standard in SQL and not one strictly enforced (yet). Trying to get in the habit but it is hard to retrain decades of doing it a different way.
Thanks in a million.
You are welcome.
Hi Tim,
This is very useful. Thank you
You are welcome.
would you do a wpf datagrid entity framework crud tutorial ?
Not sure about EF but I did do a datagrid tutorial in WPF already. That should show you what you need to wire up EF or Dapper or whatever ORM you have to the datagrid.
@@IAmTimCorey i saw that but still feel i doing something wrong or at least their is a better way than the one i use specially when it come to multi-select then add/edit/delete them to the database with mvvm
Any chance you can do something like "Entity Framework (Db 1st and Code 1st with migrations) + ASP.NET MVC In Depth" series?, showing stuff like Eager and Lazy loading... 1 to 1, 1 to many relationships and stuff like that will be GREAT!
That's a firm maybe. I'm not a big EF guy (I really don't like it for most situations). I've been considering it for the new EFCore stuff since that is so much faster than EF.
Will be looking forward for some of that sweet juicy knowledge!! :)