I had to step away from this course for a bit but I'm glad this was my re-entry point; this session did a lot to clarify just how the endpoints are configured. Thanks yet again!
I've been searching for C# training for a long time and didn't find such valuable content like yours (not even close). I think you perfectly achieved your goal by making C# easier to learn Best luck and keep forward.
I love this real life examples. Nothing teaches you better, than real life examples...by the end of the day, this is what we all do. Please Tim, keep doing these videos.
Tim - I've been in software development for many years and this is by far the best learning lab I've come across. I've enjoyed this series as it represents how development works in the field (dealing with older technology, requirements changing, etc). I'm migrating parts of a large scale winforms application to .Net Core/API's and have found this series to be an extremely helpful resource. Great job!
Aren't these videos a lot of fun! I went to the first video in the series and coded along. Then I clean up my code because I like to code and name differently and then I need more work to get it running again. And then there are the comments with many useful suggestions and improvements. So a 40 minute video can keep me busy for hours... Best c# tutorial online I think.
From my viewpoint, it would be nice to include the related product data in the get call for inventory. Your videos are being of great help to me. I'm glad that you are doing such a great job
Hi! Could you tell me what you say at 14:19? The caption says "who this person is, instead of a gooood....". I don't know what 'gooood' is and I've seen it before in this series. Thanks!
Great work Tim!! But i have a little trouble.When i am calling Get in Inventory, i am having an error System.Data.DataException: 'Error parsing column 4 (PurchaseDate=03.09.2019 14:22:09 +00:00 - Object)'----InvalidCastException: Object must implement IConvertible. My InventoryModel looks the same as yours and StoreProcedure too.
OK, so SQL and Dapper are having a hard time translating date formats between the two of them. You may have to specify what the format is coming out so that Dapper can read it (or you can specify how to parse the date in Dapper).
Enjoying the videos in this series. Have a question...should you create constants for the strings you are hard-coding? If you were to adjust the name of a stored procedure, you could have to modify multiple files. With constants, you change one spot and that's it. It would also prevent any typos that might occur since you'd be using a constant.
I could, but since I typically only call a stored procedure once or twice in code, it would result in a lot of constants that aren't being used over again. Plus, if I put them in a central location, I would end up making my code more complex without much added benefit.
Thank you for good lessons. I have a question, when ever we are calling SQLDataAccess for the instance of object we passing stored procedure, anonymous object, and connection string as a parameters to a function LoadData(). But there is a potential place to do typos. My question is if can introduce private or internal static class with predefined properties which holds stored procedures respectively, it will reduce chance to introduce typos and we can reuse it multiple times.
Hi Tim, thank you for your efforts. If I want to use a repository service layer instead of, for example InventoryData, should I create a InventoryService with injected InventoryRepository? Is a good way to go? Thanks in advance.
thanks for this tutorial, i just have few questions , how do I make the datagrid reusable? my data grid currently binded to a full property(List). I want to display other list of model. another question is how do i pass an inner join table to the data grid? do I need to make every model for each inner join? thank you please keep making these videos it helps alot.💗💗💗
I will be using Async (actually, I think I already have but I can't remember). As for manually controlling threads, I doubt I will be doing that. Using Async/Await handles most, if not all of our threading needs without the complexity of manually controlling threads.
@IAmTimCorey, not sure it's actual, but this thing with unnecessary empty object can be fixed by method that don't accept it with different signature and without second template type?
Сергей, I tried to do that and it works, but only after I refactored the connectionStringName out of the load/save functions (put it in the constructor) Then the parameters can be otional...
If you were like me, and had User EmailAddress field in the User Table as User, and User Lookup stored procedure returning Email As EmailAddress, yeah... discovered I had to add an [u].Email as EmailAddress or go back and change that.
Weirdly, the insert when executing spInventory_Insert throws " 'Cannot insert the value NULL into column 'Id', table 'TRMData.dbo.Inventory' ". Code seems to be the same.
Solved it. Seems like my id property in the dbo table wasn't set to be an identity element. Just go to properties of id row, and set Identity Specification to True.
Something that's troubling me about your table design. Your Inventory table should be called Purchases. Your Product table should be split - the actual Product table shouldn't have QuantityInStock (stock quantities belong on an Inventory table). Then you'd have an Inventory table with ProductId & QuantityInStock. In a bigger system you might be tracking other Quantity columns against your 'Inventory' and they would be added to this table.
Inventory is what we bring in, Products are what we offer. We put the QuantityInStock in the Products table because we are going to need to know that number for the front-end (a lot). However, it is a calculated number and not one we rely on. It is a "close approximation". The actual number is from the inventory brought in minus the products sold. We couldn't store that somewhere else and have it have any more meaning. Quantity is always an approximation. There is loss, miscounts, canceled transactions, and more that can have a negative impact on that number. However, we can recalculate it whenever we want (eventually every night using an Azure Function). I don't see your design adding any value. It will actually just slow down our querying but not provide any additional accuracy. That's why I chose this design.
@@IAmTimCorey TBH, from thumbnail and the beginning I've expected that you'll actually implement role restrictions in this video. But still thanks for the tutorial
Yeah, sorry, it is hard to summarize the lesson in a couple words. We are going to be covering role restrictions in the next video. @Feitan - some people just dislike it and that's ok. It actually boosts my rating when they do that (not that I prefer a dislike).
I just wanted to echo other comments here - Thanks Tim for your channel and the quality content you provide!
You are most welcome. Thanks for watching.
Ditto!
I had to step away from this course for a bit but I'm glad this was my re-entry point; this session did a lot to clarify just how the endpoints are configured. Thanks yet again!
Awesome! I am glad it was helpful.
I've been searching for C# training for a long time and didn't find such valuable content like yours (not even close). I think you perfectly achieved your goal by making C# easier to learn
Best luck and keep forward.
I appreciate the kind words and I'm glad you have found my content to be so valuable.
I love this real life examples. Nothing teaches you better, than real life examples...by the end of the day, this is what we all do. Please Tim, keep doing these videos.
Thank you!
Tim - I've been in software development for many years and this is by far the best learning lab I've come across. I've enjoyed this series as it represents how development works in the field (dealing with older technology, requirements changing, etc). I'm migrating parts of a large scale winforms application to .Net Core/API's and have found this series to be an extremely helpful resource. Great job!
Great to hear!
Aren't these videos a lot of fun! I went to the first video in the series and coded along. Then I clean up my code because I like to code and name differently and then I need more work to get it running again. And then there are the comments with many useful suggestions and improvements. So a 40 minute video can keep me busy for hours... Best c# tutorial online I think.
Thanks for being a great example of doing the practice time that real learning often requires.
Yet even more quality work from you Tim, thanks! Looking forward to the next one for the roles!
Thank you!
my respect to you force to hit that like and thanking you (thank u) before i watch a single second
I appreciate it.
Finally caught up with you Tim. Going to let this one sit a few days. Been wanting to apply some of this on a side project I've been cooking.
Great!
From my viewpoint, it would be nice to include the related product data in the get call for inventory. Your videos are being of great help to me. I'm glad that you are doing such a great job
Thanks for the suggestion and kind words.
Good work like always Tim :D Keep it up !!!
Thanks!
Hey Tim, We all know Your opinion about EntityFramework and Dapper but will you ever consider EFCORE tutorial ?
Yes, I am considering an EFCore tutorial.
Hi! Could you tell me what you say at 14:19? The caption says "who this person is, instead of a gooood....". I don't know what 'gooood' is and I've seen it before in this series. Thanks!
GUID. It is the unique identifier that looks something like this: 11594c47-a580-4d2b-b200-cbd021a076e8
@@IAmTimCorey Now that makes sense. Thanks!
Great work Tim!! But i have a little trouble.When i am calling Get in Inventory, i am having an error System.Data.DataException: 'Error parsing column 4 (PurchaseDate=03.09.2019 14:22:09 +00:00 - Object)'----InvalidCastException: Object must implement IConvertible.
My InventoryModel looks the same as yours and StoreProcedure too.
OK, so SQL and Dapper are having a hard time translating date formats between the two of them. You may have to specify what the format is coming out so that Dapper can read it (or you can specify how to parse the date in Dapper).
Thanks ,i've fixed that)
Enjoying the videos in this series. Have a question...should you create constants for the strings you are hard-coding? If you were to adjust the name of a stored procedure, you could have to modify multiple files. With constants, you change one spot and that's it. It would also prevent any typos that might occur since you'd be using a constant.
I could, but since I typically only call a stored procedure once or twice in code, it would result in a lot of constants that aren't being used over again. Plus, if I put them in a central location, I would end up making my code more complex without much added benefit.
Thank you for good lessons. I have a question, when ever we are calling SQLDataAccess for the instance of object we passing stored procedure, anonymous object, and connection string as a parameters to a function LoadData(). But there is a potential place to do typos. My question is if can introduce private or internal static class with predefined properties which holds stored procedures respectively, it will reduce chance to introduce typos and we can reuse it multiple times.
Hi Tim, thank you for your efforts. If I want to use a repository service layer instead of, for example InventoryData, should I create a InventoryService with injected InventoryRepository?
Is a good way to go?
Thanks in advance.
thanks for this tutorial, i just have few questions , how do I make the datagrid reusable? my data grid currently binded to a full property(List). I want to display other list of model. another question is how do i pass an inner join table to the data grid? do I need to make every model for each inner join? thank you please keep making these videos it helps alot.💗💗💗
Thank you very much for things you taught us. It would be great if you use thread, task, dispather and async in these series. Multithreading i mean.
I will be using Async (actually, I think I already have but I can't remember). As for manually controlling threads, I doubt I will be doing that. Using Async/Await handles most, if not all of our threading needs without the complexity of manually controlling threads.
Thanks
You are welcome.
I don't see any admin controller in this video?
@IAmTimCorey, not sure it's actual, but this thing with unnecessary empty object can be fixed by method that don't accept it with different signature and without second template type?
Can you give me a time code for what you are referring to?
@@IAmTimCorey sure, sorry, i forget that it's at 19:35
Сергей, I tried to do that and it works, but only after I refactored the connectionStringName out of the load/save functions (put it in the constructor) Then the parameters can be otional...
@@erikvolger5631 for sure that works too, and as alternative - you can make all of this optional and use it with named parameters or make it fluent.
If you were like me, and had User EmailAddress field in the User Table as User, and User Lookup stored procedure returning Email As EmailAddress, yeah... discovered I had to add an [u].Email as EmailAddress or go back and change that.
Yep, thanks for sharing.
Weirdly, the insert when executing spInventory_Insert throws " 'Cannot insert the value NULL into column 'Id', table 'TRMData.dbo.Inventory' ". Code seems to be the same.
Solved it. Seems like my id property in the dbo table wasn't set to be an identity element. Just go to properties of id row, and set Identity Specification to True.
Yep, that's the solution. Id has to be auto-incrementing in order to avoid this error.
I think it would be useful to show the product name along with all the other information
Thanks for the input.
Something that's troubling me about your table design. Your Inventory table should be called Purchases. Your Product table should be split - the actual Product table shouldn't have QuantityInStock (stock quantities belong on an Inventory table). Then you'd have an Inventory table with ProductId & QuantityInStock. In a bigger system you might be tracking other Quantity columns against your 'Inventory' and they would be added to this table.
Inventory is what we bring in, Products are what we offer. We put the QuantityInStock in the Products table because we are going to need to know that number for the front-end (a lot). However, it is a calculated number and not one we rely on. It is a "close approximation". The actual number is from the inventory brought in minus the products sold. We couldn't store that somewhere else and have it have any more meaning. Quantity is always an approximation. There is loss, miscounts, canceled transactions, and more that can have a negative impact on that number. However, we can recalculate it whenever we want (eventually every night using an Azure Function). I don't see your design adding any value. It will actually just slow down our querying but not provide any additional accuracy. That's why I chose this design.
Dude *-*
Yes?
@@IAmTimCorey Nothing to worry about, just thinking how far you reached with these amazing series and how your videos always gets an earlier dislike.
@@IAmTimCorey TBH, from thumbnail and the beginning I've expected that you'll actually implement role restrictions in this video. But still thanks for the tutorial
Yeah, sorry, it is hard to summarize the lesson in a couple words. We are going to be covering role restrictions in the next video.
@Feitan - some people just dislike it and that's ok. It actually boosts my rating when they do that (not that I prefer a dislike).
@@IAmTimCorey Don't worry I always like them back up for you...