| Topic | Presenter | Summary | Duration | Tags | Quiz | Captions |
| -------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------- | ---- | -------- |
| Adding Custom Functionality to CEF--Shipping | James Gray | This portion of the Friday Dev Training details how to add custom functionality to CEF, from \"Farm to Table\"" | 53:47 | #DevTrainings, #CEF, #ClarityTraining, #DeveloperTrainingVideos, #WeeklyDevTraining, #CustomFunctionality, #CEF | N/A | |00:00:00.030 --> 00:00:04.980 - This is 2023, which is the absolute leading edge code. 00:00:05.580 --> 00:00:09.738 - Right now it's the latest master and I pulled in the table that I 00:00:09.738 --> 00:00:13.330 - added. And I've been working with Igor on this. Doing the 00:00:13.330 --> 00:00:16.388 - same Eagles basically doing the same thing that I have, where 00:00:16.388 --> 00:00:19.168 - it's a new table here called product ship carrier method. 00:00:19.740 --> 00:00:23.928 - And this is a table that links between the product and ship 00:00:23.928 --> 00:00:28.465 - carrier methods. As the name implies, it is got a lot of the 00:00:28.465 --> 00:00:30.210 - same properties that the product 00:00:30.210 --> 00:00:32.370 - price point. Uh. 00:00:33.190 --> 00:00:36.802 - I find it. Yeah, the product price point does 'cause it's a 00:00:36.802 --> 00:00:40.715 - copy of that one and then we just took off like the percent 00:00:40.715 --> 00:00:43.725 - discount and the price rounding part because those aren't going 00:00:43.725 --> 00:00:47.337 - to be relevant to this. And then the provider was going to 00:00:47.337 --> 00:00:50.347 - function basically the same way that the tiered pricing provider 00:00:50.347 --> 00:00:53.959 - works. But instead of just going down to one object with one 00:00:53.959 --> 00:00:57.270 - price, it's going to return the list of relevant things that 00:00:57.270 --> 00:01:01.183 - qualify for what rates should be displayed to the end user in the 00:01:01.183 --> 00:01:03.290 - UI. And the idea is each price. 00:01:03.360 --> 00:01:05.560 - Each product can have. 00:01:06.130 --> 00:01:10.630 - Uh. A ship carrier method defined, or one one or more 00:01:10.630 --> 00:01:14.302 - should carry him if it's defined and each one of those ship 00:01:14.302 --> 00:01:17.974 - carrier methods will have a price on it for that product it 00:01:17.974 --> 00:01:21.646 - will be multiplied per product and then provided to the UI. So 00:01:21.646 --> 00:01:25.318 - if you have five of the Acer laptop, you had two different 00:01:25.318 --> 00:01:26.848 - ship carrier methods for it. 00:01:27.490 --> 00:01:31.642 - And the one was like overnight and one was like, you know, 00:01:31.642 --> 00:01:35.794 - ground. The ground thing would be cheaper at like 4 dollars. 4 00:01:35.794 --> 00:01:40.984 - * 5 is $20.00, so you'd see a rate for $20 of ground and then 00:01:40.984 --> 00:01:45.828 - if the overnight one was $15.15 * 5 is 75. So you'd see an 00:01:45.828 --> 00:01:50.326 - overnight rate of $75 in the UI. That's what the end user would 00:01:50.326 --> 00:01:53.440 - see and then they would pick between those two. 00:01:54.070 --> 00:01:56.534 - If that Acer item was in their 00:01:56.534 --> 00:02:00.944 - cart. If they had more items in their cart then we get added up 00:02:00.944 --> 00:02:04.040 - to the total on the same ship carry method. All that stuff 00:02:04.040 --> 00:02:07.136 - would be handle inside the ship. The ship, the provider, and the 00:02:07.136 --> 00:02:10.748 - data for that. You know how many there are in here where we can 00:02:10.748 --> 00:02:13.844 - be processed by this and we're making it smarter than what the 00:02:13.844 --> 00:02:16.424 - bare minimum requirement is because we already have a system 00:02:16.424 --> 00:02:19.778 - by which we can do things where we can affect things by dates. 00:02:19.778 --> 00:02:22.358 - In fact, things by minimum excellent quantities so that we 00:02:22.358 --> 00:02:25.196 - can do like Bolt disc or bulk pricing reductions on that 00:02:25.196 --> 00:02:28.292 - shipping rate. If the people are buying a crap load of the. 00:02:28.320 --> 00:02:31.921 - Units like we could get up there by 100 Acer laptops. We could 00:02:31.921 --> 00:02:35.245 - charge them less on the shipping because we can do like a 00:02:35.245 --> 00:02:38.292 - different shipping method that would allow it to be shipped in 00:02:38.292 --> 00:02:42.323 - bulk or something. That sort of thing, so that's kind of the 00:02:42.323 --> 00:02:45.647 - basics around what that was going to do, I, however, I'm not 00:02:45.647 --> 00:02:48.971 - going to do that 'cause I've already done that in a video, 00:02:48.971 --> 00:02:50.356 - and that's three hours long. 00:02:50.430 --> 00:02:54.797 - And I've already been working with Igor on writing that code 00:02:54.797 --> 00:02:59.958 - out, so I don't really want to do that table again. I would 00:02:59.958 --> 00:03:04.722 - rather do something else in here, So what I'm going to do 00:03:04.722 --> 00:03:08.008 - is. I'm going to make another table in here that's going to do 00:03:08.008 --> 00:03:11.115 - something else. We're going to try and create a new a whole new 00:03:11.115 --> 00:03:12.600 - feature out of it. In here. 00:03:13.200 --> 00:03:17.750 - And I was going to pick what that new feature was, but I was 00:03:17.750 --> 00:03:21.650 - paying too much attention to what was going on with the other 00:03:21.650 --> 00:03:25.225 - training and did not think to pick something in this training 00:03:25.225 --> 00:03:26.850 - like I was supposed to. 00:03:26.880 --> 00:03:31.296 - Claps for CB and CR for holding James attention on that could 00:03:31.296 --> 00:03:33.766 - jump. We're going to work in the 00:03:33.766 --> 00:03:36.096 - downloads feature. That's what we're going to do. 00:03:37.560 --> 00:03:40.911 - So product's. That get a 00:03:40.911 --> 00:03:44.098 - download. It's it's. It's a digital project or something 00:03:44.098 --> 00:03:47.751 - that needs to go along with it. Now we have stored files for 00:03:47.751 --> 00:03:51.123 - products, but I'm going to use this as a separate thing. This 00:03:51.123 --> 00:03:54.495 - is going to be like a table that specifically things which are 00:03:54.495 --> 00:03:57.305 - downloads for the product, the person who purchased. Like if 00:03:57.305 --> 00:04:00.396 - you're going to buy Microsoft Office, you would have access to 00:04:00.396 --> 00:04:03.768 - the ISO file that we created, like a CD out of it. 00:04:04.320 --> 00:04:05.951 - I'm kind of thing, so let's do 00:04:05.951 --> 00:04:09.218 - that table. So what am I going to do with that? I'm going to 00:04:09.218 --> 00:04:12.120 - make a table. Down here. 00:04:14.610 --> 00:04:17.682 - In the data model for that, now we use entity framework code. 00:04:17.682 --> 00:04:20.498 - First we should all be familiar with that, especially since you 00:04:20.498 --> 00:04:23.570 - guys have been touching a lot of the entity framework core stuff. 00:04:24.100 --> 00:04:28.156 - Annyoureyoure.net core training. So we're going 00:04:28.156 --> 00:04:30.860 - to say product download. 00:04:32.070 --> 00:04:37.502 - Say that to clear that crap off, I'm going to make get rid of 00:04:37.502 --> 00:04:41.770 - this extra piece because we don't go into the further things 00:04:41.770 --> 00:04:45.650 - otherwise. We didn't make a whole bunch of extra namespaces 00:04:45.650 --> 00:04:46.814 - I'm going to. 00:04:48.000 --> 00:04:51.606 - I think it's this and this 00:04:51.606 --> 00:04:57.309 - and interfaces. And it's a public interface. I product 00:04:57.309 --> 00:05:03.216 - download and it's a public class. I product download and it 00:05:03.216 --> 00:05:04.827 - needs to inherit. 00:05:05.370 --> 00:05:06.900 - The interface that we just 00:05:06.900 --> 00:05:11.316 - created. And OK, so there's my bare minimum that I would do 00:05:11.316 --> 00:05:14.988 - right here and I could compare that against another file to see 00:05:14.988 --> 00:05:18.660 - what if I did something right or wrong there. I'm going to 00:05:18.660 --> 00:05:22.638 - disable that. I'm gonna disable that and do that so that I have 00:05:22.638 --> 00:05:26.004 - these side by side. So there's literally 350 plus tables in 00:05:26.004 --> 00:05:27.534 - here. You can use examples. 00:05:28.100 --> 00:05:31.832 - So we're going to use an example here that goes OK. That 00:05:31.832 --> 00:05:35.749 - namespaces correct. And if I Scroll down here, we've got this 00:05:35.749 --> 00:05:39.121 - namespace which is correct and that is a public class and it's 00:05:39.121 --> 00:05:42.493 - inheriting some other stuff. We need a SQL schema tag, but it 00:05:42.493 --> 00:05:44.179 - tells what the table name is. 00:05:45.170 --> 00:05:48.107 - So it's going to be end of the product schema. It's 00:05:48.107 --> 00:05:50.510 - going to have the table name of product download. 00:05:51.540 --> 00:05:56.988 - I want it to be a nameable base. 00:05:57.600 --> 00:06:01.572 - And name will base implies that it inherits a name in a 00:06:01.572 --> 00:06:05.544 - description and it will have a string length of 256 on the 00:06:05.544 --> 00:06:09.847 - name, and there's not going to be a string length limit on the 00:06:09.847 --> 00:06:12.980 - description. Description itself is not going to be normally 00:06:12.980 --> 00:06:15.545 - mapped out with the listing conditions are generally long 00:06:15.545 --> 00:06:18.680 - and we don't necessarily need all the extra data for a 00:06:18.680 --> 00:06:21.815 - dropdown type. They have default values of null, so it serialises 00:06:21.815 --> 00:06:24.950 - it in and there's no value on description. It doesn't start 00:06:24.950 --> 00:06:26.090 - description property into your 00:06:26.090 --> 00:06:31.436 - serialized output string. And then this hashtable function is. 00:06:31.440 --> 00:06:35.070 - How to append into the string builder the necessary points to 00:06:35.070 --> 00:06:38.370 - make a unique hash for this entity. For comparisons inside 00:06:38.370 --> 00:06:41.670 - the system, there's only a couple of places that actually 00:06:41.670 --> 00:06:45.630 - use this, but it is necessary for those pieces, so we leave 00:06:45.630 --> 00:06:49.920 - him there and then they dole out to like sharing and do things 00:06:49.920 --> 00:06:54.448 - like that. On their naval base also inherits I base. 00:06:55.300 --> 00:06:58.901 - Which is the you know I base interface which gives us our ID 00:06:58.901 --> 00:07:02.225 - which has the identity spec column on it. That is the key 00:07:02.225 --> 00:07:06.103 - value and that is the index. You also get the custom key which is 00:07:06.103 --> 00:07:09.704 - our third party keys that we drop into stuff in most places a 00:07:09.704 --> 00:07:13.028 - couple of places that don't do that correctly are like the user 00:07:13.028 --> 00:07:16.629 - table because the custom key is also the username in a lot of 00:07:16.629 --> 00:07:19.953 - cases, although in sometimes we are able to work around that too 00:07:19.953 --> 00:07:23.554 - and then like for the products. It also tends to be the ski. 00:07:23.610 --> 00:07:27.801 - Then there's the created date. The updated data hash, the hash, 00:07:27.801 --> 00:07:31.992 - the active flag flag, or just used for soft deletes. There's 00:07:31.992 --> 00:07:36.183 - the string value of the Jason attributes that get stored, and 00:07:36.183 --> 00:07:39.231 - then there's the serializable attribute dictionary, which is 00:07:39.231 --> 00:07:42.279 - basically just returning a serialized version of that 00:07:42.279 --> 00:07:47.232 - string so that you can work with the class to make a dictionary 00:07:47.232 --> 00:07:51.423 - out of those stuff instead has the two string, which just 00:07:51.423 --> 00:07:53.328 - serializes the object using gson 00:07:53.328 --> 00:07:56.915 - settings. That we specify. And then there's that same like 00:07:56.915 --> 00:08:00.465 - icon, able with the hashtable string. Don't listen to hashable 00:08:00.465 --> 00:08:04.015 - string. We don't include the created date with the updated 00:08:04.015 --> 00:08:08.630 - date, the hash, the OR the custom key, or the ID on this. 00:08:08.630 --> 00:08:12.180 - So we want the comparison to compare the properties that 00:08:12.180 --> 00:08:15.375 - matter, not what the identification or when it occur. 00:08:15.375 --> 00:08:19.635 - Departs in this hashtable string so that we can say that just 00:08:19.635 --> 00:08:23.185 - because it happened at a different time doesn't matter if 00:08:23.185 --> 00:08:25.315 - the material data is the same. 00:08:25.390 --> 00:08:28.477 - So we keep that stuff inside this hashable part. 00:08:29.170 --> 00:08:32.014 - OK, so we follow that inherits backup we got based demo base 00:08:32.014 --> 00:08:35.332 - and we got our product downloads going to base so we know that if 00:08:35.332 --> 00:08:38.650 - you look at this we have a bunch of properties in here and that 00:08:38.650 --> 00:08:40.072 - could even override a lot of 00:08:40.072 --> 00:08:43.336 - them. To do all these different things about the activity, 00:08:43.336 --> 00:08:46.384 - override the clone. I could override all of this stuff if I 00:08:46.384 --> 00:08:49.686 - wanted to, but I'm not going to overwrite any of these 'cause I 00:08:49.686 --> 00:08:53.242 - don't care, they're going to do what I want them to do out of 00:08:53.242 --> 00:08:55.782 - box now. What else would I include on a download? 00:08:56.390 --> 00:08:59.450 - What else do I want to include? Maybe there is a string? 00:09:00.120 --> 00:09:05.004 - Find actually will do this up in the interface. First, a string 00:09:05.004 --> 00:09:06.225 - that says link. 00:09:06.930 --> 00:09:10.395 - Or I could say like absolute URL. 00:09:12.390 --> 00:09:16.395 - I could say another one. That's a relative URL. 00:09:18.190 --> 00:09:22.038 - In case this thing is done which way, and then I'll have a 00:09:22.038 --> 00:09:24.998 - boolean flag that switches between the two who is absolute. 00:09:26.930 --> 00:09:27.770 - URL. 00:09:29.440 --> 00:09:32.573 - You know, and some of this I may not actually use in production 00:09:32.573 --> 00:09:35.706 - or anything on a real thing, but I'm just giving you examples of 00:09:35.706 --> 00:09:39.080 - what we would do here. So I have three properties here. I want to 00:09:39.080 --> 00:09:40.526 - link back to the product itself. 00:09:41.090 --> 00:09:45.178 - So and then the product itself is going to be my master, so I'm 00:09:45.178 --> 00:09:47.222 - going to use an interface to do 00:09:47.222 --> 00:09:51.810 - that, says I. And a product relation well. 00:09:53.100 --> 00:09:56.166 - I'm not relating to another side too, so I really just need a. I 00:09:56.166 --> 00:09:57.918 - have a product so I see I have 00:09:57.918 --> 00:10:00.898 - a. Product so I don't have an interface that does that, so I'm 00:10:00.898 --> 00:10:01.972 - going to do it all manually. 00:10:02.990 --> 00:10:05.762 - So I'm going to say int product 00:10:05.762 --> 00:10:07.550 - ID. Get set. 00:10:08.080 --> 00:10:10.855 - And even if I could typos, I can fix them. It's not a big deal. 00:10:11.860 --> 00:10:13.708 - And it goes to the product. 00:10:14.250 --> 00:10:16.616 - And then we get rid of the part and then I have to inherit. 00:10:17.190 --> 00:10:21.272 - Back in this piece, click on it stupid. There you go. Be covered 00:10:21.272 --> 00:10:24.726 - data model which points back into this guys name space which 00:10:24.726 --> 00:10:28.494 - would be pointing over that thing and then I want to give 00:10:28.494 --> 00:10:32.576 - all of these properties stuff on them. So I'm going to do region 00:10:32.576 --> 00:10:33.832 - related objects relation related 00:10:33.832 --> 00:10:37.610 - objects. Get rid of 00:10:37.610 --> 00:10:43.605 - that. I'm gonna say that it's pound region product download 00:10:43.605 --> 00:10:46.330 - properties. And 00:10:46.330 --> 00:10:52.982 - region. And then I'm going to. I'm using a hot key to 00:10:52.982 --> 00:10:54.128 - generate this information. 00:10:56.360 --> 00:10:59.961 - And I'll make a quick update to some of this content here so 00:10:59.961 --> 00:11:01.069 - that this is this. 00:11:02.120 --> 00:11:05.216 - Because my hot key that generates this stuff wasn't 00:11:05.216 --> 00:11:09.344 - tirlea smart enough to do some of this stuff, I'm just making 00:11:09.344 --> 00:11:10.720 - it slightly better verbiage. 00:11:11.500 --> 00:11:15.840 - And then the and then the so will say that this is the master 00:11:15.840 --> 00:11:18.300 - product. Our master. 00:11:18.810 --> 00:11:20.388 - Slash owning product. 00:11:23.290 --> 00:11:27.360 - And I'll put that same content into these other things. 00:11:28.020 --> 00:11:31.428 - You can see here now I have three properties that I'm going 00:11:31.428 --> 00:11:35.120 - to. I'm capable of setting and I have my relationship over to the 00:11:35.120 --> 00:11:37.960 - master according to the interface. I'll go ahead and add 00:11:37.960 --> 00:11:41.368 - this thing to the top so it automatically adds my style cap 00:11:41.368 --> 00:11:44.776 - style, cop compatible tag to the top and it just gives basic 00:11:44.776 --> 00:11:47.900 - information of saying like how long is the class been here. 00:11:47.900 --> 00:11:51.024 - Clarity ventures is the one who company that made this, so 00:11:51.024 --> 00:11:54.716 - people should just come in and steal our code. It's it's not OK 00:11:54.716 --> 00:11:58.124 - and then come back down here and I say OK, let's implement. 00:11:58.130 --> 00:11:59.993 - The missing members, so we at least have them. 00:12:01.190 --> 00:12:03.297 - They're all properties. They automatically inherit the 00:12:03.297 --> 00:12:06.307 - documentation from this guy on the other parents, don't worry 00:12:06.307 --> 00:12:07.812 - about any of that stuff. 00:12:08.940 --> 00:12:11.760 - I don't have any collections or anything, so I don't need to 00:12:11.760 --> 00:12:14.580 - worry about doing the same stuff that I have on product here. 00:12:14.580 --> 00:12:16.930 - Where I'm inheriting collections and had to have a constructor 00:12:16.930 --> 00:12:19.515 - that runs all this stuff, so that's thankful they don't have 00:12:19.515 --> 00:12:23.275 - to do any of that stuff. Let's say that I want to add a type to 00:12:23.275 --> 00:12:25.860 - this thing so that we have downloads that are types. We 00:12:25.860 --> 00:12:28.680 - could do stuff with it. So let's say I have a type. 00:12:29.360 --> 00:12:33.140 - Uh, and I need to use the one that says there, so I'm going to 00:12:33.140 --> 00:12:35.660 - say I product download type. Well that class doesn't exist 00:12:35.660 --> 00:12:37.424 - yet, so I need to add it. 00:12:37.990 --> 00:12:40.558 - Now, the easiest way to type thing is to just copy an 00:12:40.558 --> 00:12:41.628 - existing type one and then 00:12:41.628 --> 00:12:44.496 - rename it. So I'm gonna take this product type and I'm 00:12:44.496 --> 00:12:45.466 - going to start download type. 00:12:47.020 --> 00:12:48.730 - I'm going to open that file. 00:12:49.320 --> 00:12:51.070 - And then I'm going to add the word download everywhere. 00:12:52.260 --> 00:12:54.273 - And then I'm gonna make sure that this says that it 00:12:54.273 --> 00:12:55.188 - actually says 2020 on it. 00:12:57.550 --> 00:13:00.930 - K and I'm going to kill this stuff because I don't want to 00:13:00.930 --> 00:13:04.310 - use any of that for that since there's only one thing here, I 00:13:04.310 --> 00:13:07.950 - don't really need to drop it to new line. I can sleep on the 00:13:07.950 --> 00:13:12.056 - same line. And then I can start doing download stuff here. 00:13:14.640 --> 00:13:17.110 - I don't know why it needs to format the basic text, but sure. 00:13:18.400 --> 00:13:24.096 - Download type I don't need these extra implementations. 00:13:24.680 --> 00:13:28.235 - Get rid of all that and then now I don't need all that stuff on 00:13:28.235 --> 00:13:30.842 - those interfaces. So now this is really basic download. This is 00:13:30.842 --> 00:13:34.228 - really basic typeable. To drop on here anti people base 00:13:34.228 --> 00:13:36.964 - inherits nameable base or is rather it inherits displayable 00:13:36.964 --> 00:13:40.004 - base which inherits naval base. So those same properties. We 00:13:40.004 --> 00:13:43.956 - heard it before from naval base we have all those and then we're 00:13:43.956 --> 00:13:45.476 - also inheriting a display name. 00:13:46.030 --> 00:13:49.882 - A sort order and a translation key property, and that one has 00:13:49.882 --> 00:13:53.413 - 128, which is all of our translations are keys or maximum 00:13:53.413 --> 00:13:56.944 - 128 characters, but Nullable Order value. In case we want to 00:13:56.944 --> 00:14:00.796 - set those Anna display name in case these types are coming from 00:14:00.796 --> 00:14:04.648 - like a third party thing with ugly, all caps names or weird 00:14:04.648 --> 00:14:08.500 - stuff. So that way we can override it manually if we want 00:14:08.500 --> 00:14:11.710 - with a friendly customer facing game. That makes it really 00:14:11.710 --> 00:14:13.636 - really nice for them if we 00:14:13.636 --> 00:14:19.740 - choose. So we could get rid of that type of base. There are 00:14:19.740 --> 00:14:22.610 - three things that inherit typeable, sorry displayable 00:14:22.610 --> 00:14:26.710 - base. There's typeable status, able and stable. Stable is used 00:14:26.710 --> 00:14:30.390 - on the. The sales collections, like a cart in order and invoice 00:14:30.390 --> 00:14:33.240 - status symbols are used on things like there's a product. 00:14:33.240 --> 00:14:36.375 - They are also used in things like the order status, things 00:14:36.375 --> 00:14:40.080 - like that and then the type of bowls all inherit these as well. 00:14:41.660 --> 00:14:44.410 - So I'm adding the interface. Looks like it since I'm adding 00:14:44.410 --> 00:14:47.660 - another interface I should put that back to a new line and I'll 00:14:47.660 --> 00:14:50.908 - say. I'm sorry, not you wrong class. 00:14:52.220 --> 00:14:56.081 - Put that one away and we're going to close that window so I 00:14:56.081 --> 00:14:59.645 - don't go back and do that again accidentally and now this thing 00:14:59.645 --> 00:15:01.427 - exists so I could do that. 00:15:02.050 --> 00:15:05.740 - And then I need to implement my. I have a type. Well I have one 00:15:05.740 --> 00:15:07.708 - over here so I can just copy and 00:15:07.708 --> 00:15:10.050 - paste this interface. In here. 00:15:11.500 --> 00:15:13.215 - And then it needs to bring all 00:15:13.215 --> 00:15:16.218 - this junk back in. So they brought in some of the stuff 00:15:16.218 --> 00:15:17.098 - that I wasn't using before. 00:15:18.600 --> 00:15:21.867 - And this instead of product type in easy probably download type. 00:15:23.300 --> 00:15:26.640 - And then that should inherit correctly. But why is it 00:15:26.640 --> 00:15:29.646 - complaining that it doesn't know what to put there? 00:15:32.140 --> 00:15:34.000 - Because this is supposed to be 00:15:34.000 --> 00:15:38.920 - that I. That's why so. Now this is this thing here. OK, so we 00:15:38.920 --> 00:15:43.015 - have a default value for the type ID of zero. It is an 00:15:43.015 --> 00:15:45.850 - inverse property that points to the product download types, 00:15:45.850 --> 00:15:49.832 - tables, ID property. It is referenced by the name, type ID 00:15:49.832 --> 00:15:54.158 - and type, so we have that thing in there and I can collapse this 00:15:54.158 --> 00:15:58.175 - and no longer look and deal with it. I wanna copy this same 00:15:58.175 --> 00:16:01.574 - region down to here and this same region down to here. 00:16:02.470 --> 00:16:06.910 - Anne, this end region from here to there and there. 00:16:07.420 --> 00:16:11.020 - Now I need to do this some of the same, like relationship 00:16:11.020 --> 00:16:14.618 - stuff. With this stuff and I want to say that it's going to 00:16:14.618 --> 00:16:17.246 - be instead of course map. I actually don't want to map it 00:16:17.246 --> 00:16:20.168 - out. Thought map out ever. 00:16:21.400 --> 00:16:25.470 - And don't nap in ever. 00:16:27.290 --> 00:16:31.150 - Are actually say allow map. 00:16:31.760 --> 00:16:34.928 - An relate workflows but don't auto generate so, so if you're 00:16:34.928 --> 00:16:37.808 - sending in a product download record like from from through 00:16:37.808 --> 00:16:40.688 - connect, you would have to have the product record already 00:16:40.688 --> 00:16:43.568 - exists before you can create the direct download record. You 00:16:43.568 --> 00:16:46.448 - would not be able to just automatically generate a product 00:16:46.448 --> 00:16:49.904 - with. It is what the intention of that actually does and that 00:16:49.904 --> 00:16:53.360 - affects what the T fours do later down the line. Same here. 00:16:55.140 --> 00:16:59.208 - Question I was just wondering how do you think we would I 00:16:59.208 --> 00:17:02.937 - how would we allow the user to download this multiple times? 00:17:02.937 --> 00:17:07.683 - How do you tie it? I guess you just tie it to the the 00:17:07.683 --> 00:17:11.412 - purchase ID of the previous record like you said and of 00:17:11.412 --> 00:17:14.802 - the purchase record and I'm just thinking too far ahead. 00:17:16.170 --> 00:17:19.877 - OK, good point, let me let me finish making this relationship 00:17:19.877 --> 00:17:24.595 - here and then we can look at the explore that real quick. OK, so 00:17:24.595 --> 00:17:28.976 - this one we're going over to the product ID is the foreign key 00:17:28.976 --> 00:17:33.020 - instead of type it so that one that we have our relationship 00:17:33.020 --> 00:17:35.716 - instantiated there. This will automatically generate all the 00:17:35.716 --> 00:17:39.760 - relationship code for us that we need on that stuff. So we 00:17:39.760 --> 00:17:43.130 - shouldn't do much about's there. We do need to specify. 00:17:43.150 --> 00:17:44.749 - A default value. 00:17:46.550 --> 00:17:49.550 - And I'll say that it's going to be false because normally we 00:17:49.550 --> 00:17:52.550 - would just have a relative URL in a single website. We would 00:17:52.550 --> 00:17:55.800 - only use absolute URLs if we were going to try and use like 00:17:55.800 --> 00:17:58.550 - if it was pointing to some third party location, probably. So 00:17:58.550 --> 00:17:59.800 - let's have a default value, 00:17:59.800 --> 00:18:02.380 - false. Let's say that the default value for 00:18:02.380 --> 00:18:03.540 - these strings is null. 00:18:04.870 --> 00:18:08.455 - So I'll do that and that and we need to put in a maximum string 00:18:08.455 --> 00:18:11.323 - length on these things, and we need to make sure that they're 00:18:11.323 --> 00:18:13.713 - not Unicode because these are URLs, string is Unicode, False. 00:18:14.500 --> 00:18:16.180 - So we'll add that to both of 00:18:16.180 --> 00:18:19.662 - these. And then real URLs shouldn't be longer than like 00:18:19.662 --> 00:18:22.940 - 512 characters. So let's say that it's got a string length. 00:18:24.840 --> 00:18:29.642 - Of five 12 and this is all just service stack stuff. No. This is 00:18:29.642 --> 00:18:33.758 - entity framework stuff to do that stuff. So we have the data 00:18:33.758 --> 00:18:37.188 - annotation from there. So this tells the database that is 00:18:37.188 --> 00:18:40.961 - supposed to be created. A column that has. It's basically going 00:18:40.961 --> 00:18:42.333 - in March are 512. 00:18:42.980 --> 00:18:44.445 - For each of these two 00:18:44.445 --> 00:18:48.035 - properties. And that is good because it's a string. It's 00:18:48.035 --> 00:18:51.870 - going to be Noble and then will have value. And also for the 00:18:51.870 --> 00:18:53.050 - Jason serialization that occurs 00:18:53.050 --> 00:18:56.920 - with these things. So that kind of takes care of those 00:18:56.920 --> 00:18:59.870 - properties that I was building out initially, but you have 00:18:59.870 --> 00:19:03.410 - mentioned, how does it know that the user has access to this 00:19:03.410 --> 00:19:04.590 - thing to do this? 00:19:05.200 --> 00:19:08.476 - Now, primarily, that information would come through the fact. 00:19:09.200 --> 00:19:12.860 - Did they bought the product? The product download was tide to in 00:19:12.860 --> 00:19:15.910 - their relationship, but as far as performance goes, how would 00:19:15.910 --> 00:19:20.485 - we know that we need to do this on a regular basis? Like if we 00:19:20.485 --> 00:19:23.535 - just loading the user dashboard and they were loading their 00:19:23.535 --> 00:19:26.890 - screen that has the downloads they have access to like you 00:19:26.890 --> 00:19:29.025 - would go into like the Red Gate. 00:19:29.030 --> 00:19:32.726 - No, if you're going to the Red Gate Software website or Dean 00:19:32.726 --> 00:19:36.730 - and Sharp website and you wanted to go to the download section of 00:19:36.730 --> 00:19:40.118 - those websites, I'm sure they don't have to go look through 00:19:40.118 --> 00:19:43.506 - all of your purchase records over and over again. That would 00:19:43.506 --> 00:19:46.278 - get slow, not necessarily performing any website, so we 00:19:46.278 --> 00:19:49.974 - probably need to make a record that says that the account has 00:19:49.974 --> 00:19:52.746 - access to these product downloads more directly so that 00:19:52.746 --> 00:19:55.826 - they can be more directly loaded, and that would mean 00:19:55.826 --> 00:19:58.906 - something that we would need to populate that information during 00:19:58.906 --> 00:20:02.533 - a checkout sequence. Uh, you know, after a payment is made or 00:20:02.533 --> 00:20:05.800 - something like that, depending on who the client is or when 00:20:05.800 --> 00:20:08.770 - that stuff would need to be activated. So that's something 00:20:08.770 --> 00:20:12.631 - we need to consider and put in here. What's the best way we 00:20:12.631 --> 00:20:13.819 - should do that probably? 00:20:14.780 --> 00:20:18.949 - By relating an account and saying that the account had the 00:20:18.949 --> 00:20:22.739 - purchase for this happen at a certain time, which probably 00:20:22.739 --> 00:20:25.013 - means we need and like an 00:20:25.013 --> 00:20:29.146 - account. Product download table right account Download 00:20:29.146 --> 00:20:34.932 - Association table or something? Yeah yeah. So we would go over 00:20:34.932 --> 00:20:39.666 - to the account. Product has the account product purchases. 00:20:42.370 --> 00:20:44.530 - So actually I believe we can handle it through that, so we 00:20:44.530 --> 00:20:46.690 - already had this account product table and then we can say that 00:20:46.690 --> 00:20:47.590 - this account product labels how 00:20:47.590 --> 00:20:51.052 - we're going to read that. So I don't need to make it another 00:20:51.052 --> 00:20:54.258 - table to do it, will just say that you know they were able to 00:20:54.258 --> 00:20:56.548 - look through the products and say that the account product 00:20:56.548 --> 00:20:59.296 - was purchased that way and then we'll have to make sure that 00:20:59.296 --> 00:21:01.128 - our workflow and checkout process populates this table 00:21:01.128 --> 00:21:04.105 - with this stuff. If we're going to do this feature and we can 00:21:04.105 --> 00:21:06.853 - go into populating that further down the line when we get into 00:21:06.853 --> 00:21:07.998 - the checkout provider and stuff. 00:21:09.670 --> 00:21:13.271 - So yes, we will handle that, but we will handle that later. I'm 00:21:13.271 --> 00:21:16.318 - not going to make further schema for it at this time. 00:21:16.930 --> 00:21:19.500 - For this 'cause this will get it through the product. 00:21:20.950 --> 00:21:22.642 - Because we are relating it back 00:21:22.642 --> 00:21:27.146 - through there. OK, so now from the product perspective the 00:21:27.146 --> 00:21:30.854 - product needs a collection that would handle this information. 00:21:30.854 --> 00:21:35.386 - So let's make an Association list here. Say like the product 00:21:35.386 --> 00:21:39.646 - membership levels. Just like this, we will add whoops. 00:21:40.600 --> 00:21:41.920 - A product download. 00:21:43.450 --> 00:21:45.220 - And then say product downloads. 00:21:47.710 --> 00:21:50.938 - And then I use my hot key to generate the documentation for 00:21:50.938 --> 00:21:54.166 - automatically. So now we have this thing and now this thing no 00:21:54.166 --> 00:21:57.394 - longer works. So I need to make an associated objects list. Down 00:21:57.394 --> 00:22:01.429 - here I'm going to make it next to the same one so that I know 00:22:01.429 --> 00:22:03.043 - what I'm doing with the same 00:22:03.043 --> 00:22:10.080 - stuff here. It's going to be a public Apayao, Roberta lick. 00:22:11.740 --> 00:22:15.544 - And we're going to get the same treatment. There would have the 00:22:15.544 --> 00:22:20.120 - inherit Doc. From the other piece and all of these need to 00:22:20.120 --> 00:22:22.568 - have point to an internal collection property field. 00:22:24.160 --> 00:22:31.045 - And I'm just going to copy this guy real quick so that I have a 00:22:31.045 --> 00:22:33.340 - quick starting point and say 00:22:33.340 --> 00:22:36.600 - downloads. And I know that it doesn't exist yet. That's OK. 00:22:36.600 --> 00:22:37.867 - I'm going to make it up here. 00:22:39.550 --> 00:22:41.674 - So just like with product membership levels, it's really 00:22:41.674 --> 00:22:44.506 - good in a lot of these cases. Basic copy something to start 00:22:44.506 --> 00:22:47.338 - with is it makes it really obvious like what you need to 00:22:47.338 --> 00:22:50.235 - still fill in. As much as 00:22:50.235 --> 00:22:54.258 - possible. OK, so that probably all exists and we still need to 00:22:54.258 --> 00:22:55.062 - initialize it. Insider 00:22:55.062 --> 00:22:57.550 - constructor. So we'll use it inside this. 00:22:59.310 --> 00:23:03.714 - OK, so now the product is aware that there's This collection of 00:23:03.714 --> 00:23:07.384 - product download that's going to have from the other direction. 00:23:07.440 --> 00:23:09.728 - In order to reference it, load that information. 00:23:10.840 --> 00:23:16.861 - OK. And it makes it know that the 00:23:16.861 --> 00:23:19.291 - service no longer faded out, saying that it is not 00:23:19.291 --> 00:23:21.721 - referenced. It does have a reference to it inside here, 00:23:21.721 --> 00:23:24.880 - which is good. So now that we created those pieces and we know 00:23:24.880 --> 00:23:27.796 - what those points are going to do, we're using one of our 00:23:27.796 --> 00:23:30.469 - interfaces were pulling that stuff out. I'm going to go ahead 00:23:30.469 --> 00:23:33.142 - and close these windows here and we're going to start getting 00:23:33.142 --> 00:23:35.815 - into running some other stuff and I'll do a quick explanation 00:23:35.815 --> 00:23:38.488 - about some of these. Shared interface is going to you guys 00:23:38.488 --> 00:23:39.946 - have a lot of questions about 00:23:39.946 --> 00:23:44.478 - these? The idea behind these is as much as possible. We want to 00:23:44.478 --> 00:23:47.822 - use common workflows like just like we were saying earlier. If 00:23:47.822 --> 00:23:50.862 - you've written something once, you don't want to write it 00:23:50.862 --> 00:23:54.510 - 20,000 times. It's annoying as hell. There are 350 tables and a 00:23:54.510 --> 00:23:58.158 - lot of this stuff is identical across the board. We don't need 00:23:58.158 --> 00:24:01.697 - to write. We need to hand write all these interfaces handlers 00:24:01.697 --> 00:24:05.116 - over and over again with all this code over and over and over 00:24:05.116 --> 00:24:07.483 - again. And then you know whenever we find something 00:24:07.483 --> 00:24:10.639 - that's a problem with the pattern having to go in and fix 00:24:10.639 --> 00:24:13.006 - it 350 times. That's why we started implementing those 00:24:13.006 --> 00:24:16.162 - interfaces in these T fours in the 1st place. So for instance 00:24:16.162 --> 00:24:19.318 - if I have a product relationship table which is the table that 00:24:19.318 --> 00:24:22.474 - links to top of product between between one table in another, I 00:24:22.474 --> 00:24:25.630 - need to determine if I need to know whether the product is 00:24:25.630 --> 00:24:29.312 - going to be the Master of the product is going to be a slave. 00:24:29.340 --> 00:24:35.232 - Because it's depending on who's going to be the primary thing in 00:24:35.232 --> 00:24:40.142 - that stuff. So for instance, let's find an instance where 00:24:40.142 --> 00:24:43.498 - the. F-12 key would work on this stupid keyboard. 00:24:45.610 --> 00:24:49.355 - Come on, come on after off key. 00:24:50.380 --> 00:24:54.076 - Come on after key so it arrives symbols. 00:24:57.080 --> 00:24:59.050 - Or he'll shift at 12. 00:24:59.690 --> 00:25:01.074 - He wanted to do that, but then I 00:25:01.074 --> 00:25:03.444 - can't click it. So I'll just say 00:25:03.444 --> 00:25:05.290 - find usages. And have re sharper 00:25:05.290 --> 00:25:10.922 - tell me that way. OK, so for instance product category table 00:25:10.922 --> 00:25:16.040 - is 1. Product category table is the link between the product in 00:25:16.040 --> 00:25:19.351 - the category and in this case the product is the master. 00:25:20.370 --> 00:25:23.514 - And the category is the slave and we have a category instance 00:25:23.514 --> 00:25:26.396 - our interface. It's doing the same thing, it's just doing it 00:25:26.396 --> 00:25:29.016 - from the other direction with the category, and then we're 00:25:29.016 --> 00:25:32.160 - adding a sort order to it, and then we implement those things 00:25:32.160 --> 00:25:35.566 - and then we say that the Master is the product, and so we're 00:25:35.566 --> 00:25:38.448 - ****** through master ID, and then interfaces that we have in 00:25:38.448 --> 00:25:40.806 - the workflows layer and the associate workflows that the 00:25:40.806 --> 00:25:43.164 - workflows themselves. All of those things can reference the 00:25:43.164 --> 00:25:46.570 - same name of Master and slave and master ID in slave ID for 00:25:46.570 --> 00:25:49.976 - this stuff in order to run these things. Now I still have all 00:25:49.976 --> 00:25:52.596 - these obsolete properties in here. That's a reference it by 00:25:52.596 --> 00:25:53.906 - product ID for these other 00:25:53.906 --> 00:25:56.950 - interfaces. I am going to eventually be able to move that 00:25:56.950 --> 00:26:00.447 - stuff. I just need a little bit more effort and time before I 00:26:00.447 --> 00:26:03.675 - can physically get in there, remove that stuff and I know it 00:26:03.675 --> 00:26:07.441 - says it was going to move it 20, not 4, but 20 minutes before 00:26:07.441 --> 00:26:10.323 - didn't actually happen. And now it's going to be more like 2020. 00:26:10.840 --> 00:26:15.494 - .4 so I can actually say like 224 right now. These and that 00:26:15.494 --> 00:26:19.432 - would be more accurate of when I'm actually going to be 00:26:19.432 --> 00:26:22.796 - removing it. In all this stuff 00:26:22.796 --> 00:26:26.420 - now. That will take care of those things, and it basically 00:26:26.420 --> 00:26:29.456 - just says as much as commonly as possible. You know, say where 00:26:29.456 --> 00:26:32.998 - this stuff is going to go. Where is going to come from? Now? Some 00:26:32.998 --> 00:26:35.528 - of these tables are some of these relationships aren't just 00:26:35.528 --> 00:26:38.058 - about relationships, there, just about like what is this table? 00:26:38.058 --> 00:26:40.841 - This table is an image table, while like a product image 00:26:40.841 --> 00:26:43.624 - versus like any account image it's showing in recording a lot 00:26:43.624 --> 00:26:46.913 - of the same info, but we're not using one table. Store that info 00:26:46.913 --> 00:26:49.696 - because having one table store that info and having 30 things 00:26:49.696 --> 00:26:52.226 - access it gets really confusing and really hard with the 00:26:52.226 --> 00:26:54.250 - relationships to manage where that stuff comes from. 00:26:54.320 --> 00:26:58.556 - An example of that word that is problematic is the notes table, 00:26:58.556 --> 00:27:00.321 - which happens in the structure. 00:27:00.890 --> 00:27:05.174 - Here, so in the notes table it's related to a whole bunch 00:27:05.174 --> 00:27:06.245 - of different crap. 00:27:07.580 --> 00:27:11.070 - And trying to interface with this thing from all these 00:27:11.070 --> 00:27:14.560 - different points gets really annoying. You can see all the 00:27:14.560 --> 00:27:17.701 - different things that were related were attached to it. 00:27:17.701 --> 00:27:21.540 - It's ridiculous trying to make UI to manage notes inside stuff 00:27:21.540 --> 00:27:25.030 - and have it associated with the correct thing inside the 00:27:25.030 --> 00:27:28.520 - associate workflows also gets ridiculous, so it's better in a 00:27:28.520 --> 00:27:32.359 - lot of these cases to have these individual types and things 00:27:32.359 --> 00:27:35.151 - running their sets of collections, like for instance 00:27:35.151 --> 00:27:36.896 - the quotes tables and the 00:27:36.896 --> 00:27:39.834 - returns tables. There's a sales return file sales quote 00:27:39.834 --> 00:27:43.266 - file instead of just putting into a single file table. They 00:27:43.266 --> 00:27:47.010 - have their own sets of these things and they conform to the 00:27:47.010 --> 00:27:50.130 - same interface groups so they could still be utilized in 00:27:50.130 --> 00:27:53.562 - workflows that do common stuff instead of having to do this. 00:27:53.562 --> 00:27:56.370 - One weird table that you can't interface correctly because 00:27:56.370 --> 00:27:59.490 - everything has its own reference to it with its own 00:27:59.490 --> 00:28:01.986 - names that does different things which get really 00:28:01.986 --> 00:28:02.298 - annoying. 00:28:03.670 --> 00:28:06.178 - So is that kind of makes sense already have any questions about 00:28:06.178 --> 00:28:08.686 - this stuff before we move on to the next group of stuff? 00:28:14.260 --> 00:28:21.388 - It does make sense I I've been looking. I've been working 00:28:21.388 --> 00:28:27.220 - in the 00T four service stack, TypeScript code generator 00:28:27.220 --> 00:28:34.672 - section, and. Having to kind of modify at a tiny tiny bit to 00:28:34.672 --> 00:28:40.194 - play nice with the shared file where we can't use namespaces 00:28:40.194 --> 00:28:44.550 - anymore and. I feel like if people haven't seen stuff like 00:28:44.550 --> 00:28:48.250 - that, they're not appreciating just how many of these extends. 00:28:48.250 --> 00:28:53.060 - I am a relationship table. I'm an image table. There are a ton 00:28:53.060 --> 00:28:57.890 - of these. Yeah, like it does. I am an image table. If I hit find 00:28:57.890 --> 00:29:00.860 - usages you could see how many are inheriting it. Oh yeah. 00:29:01.440 --> 00:29:07.138 - Yeah, 19 or probably 17 separate tables are inheriting that. Sure 00:29:07.138 --> 00:29:09.210 - and that's just images. 00:29:09.210 --> 00:29:14.610 - If you had to type all of these out for, I mean if each separate 00:29:14.610 --> 00:29:18.570 - table had to have all of those things separately, every single 00:29:18.570 --> 00:29:22.530 - thing would be like 80 columns. And that's for simple things. 00:29:24.010 --> 00:29:27.850 - Yeah, it gets. It gets pretty narrowly when you when you break 00:29:27.850 --> 00:29:31.690 - all that stuff out. OK, so we got those these interfaces kind 00:29:31.690 --> 00:29:35.850 - of say like I am something I am something that does something. I 00:29:35.850 --> 00:29:39.370 - am a relationship table. I am a geographical location table or 00:29:39.370 --> 00:29:43.210 - there's like I am filterable by account which allows me to work 00:29:43.210 --> 00:29:47.690 - with a lot of this filter buys. I am a filterable by product. I 00:29:47.690 --> 00:29:50.570 - am filterable by blah. Well actually our product download 00:29:50.570 --> 00:29:52.170 - table probably qualifies for I'm 00:29:52.170 --> 00:29:55.666 - filterable by product. So we probably want to be able to 00:29:55.666 --> 00:29:58.086 - implement that interface, and it's not nullable, so we want 00:29:58.086 --> 00:30:01.232 - that one. So let's go over to our table and go add that. 00:30:03.070 --> 00:30:04.910 - We should be filterable byproducts. 00:30:07.740 --> 00:30:10.369 - And guess what that does? It means that this thing doesn't 00:30:10.369 --> 00:30:12.759 - need these properties here, so I could take those off. 00:30:14.220 --> 00:30:18.912 - And it means that the properties that it's doing right here are 00:30:18.912 --> 00:30:22.822 - OK, but I should probably find another iron filter avoid 00:30:22.822 --> 00:30:27.303 - product. And see if there's other properties I should be 00:30:27.303 --> 00:30:31.230 - implementing in a special way. So let's say find usages. Let's 00:30:31.230 --> 00:30:33.372 - go look at, say, the brand 00:30:33.372 --> 00:30:37.600 - product one. It says I am filter robot parade our product now 00:30:37.600 --> 00:30:40.614 - this one is got a full relationship so it's got these 00:30:40.614 --> 00:30:43.080 - other master and slave properties. Who's got the slave 00:30:43.080 --> 00:30:46.368 - property that's part of forward to? I don't actually need to do 00:30:46.368 --> 00:30:49.656 - any of this in this table because I'm not doing a full 00:30:49.656 --> 00:30:52.396 - relationship over to another table. I'm just talking back to 00:30:52.396 --> 00:30:55.958 - the product itself, so I don't need to take care of that. And 00:30:55.958 --> 00:30:58.424 - these properties are satisfying that that interface already, so 00:30:58.424 --> 00:31:04.058 - we're OK there. But now I can use this interface on stuff 00:31:04.058 --> 00:31:08.478 - later down the road because I have this thing here. 00:31:09.140 --> 00:31:12.728 - For that stuff, so there's other things in here, just like sales 00:31:12.728 --> 00:31:16.316 - at Target, target base and sales databases have to do with those 00:31:16.316 --> 00:31:19.306 - collections and things like that. And then all of these 00:31:19.306 --> 00:31:22.595 - interfaces like back reference each other for how they talk to 00:31:22.595 --> 00:31:26.781 - talk to things they also have. Like I have a contact. I have a 00:31:26.781 --> 00:31:30.967 - product, I have a stored file. I have a type, I have notes. I 00:31:30.967 --> 00:31:33.957 - have a match codes, I have languages, I have Jason 00:31:33.957 --> 00:31:36.947 - attributes, which Is Everybody. All that stuff like I have 00:31:36.947 --> 00:31:40.535 - images. These are all things that say that I have. So these 00:31:40.535 --> 00:31:43.525 - are common interfaces that can use especially in like associate 00:31:43.525 --> 00:31:46.768 - workflows. And things in order to make that stuff. So like I 00:31:46.768 --> 00:31:49.864 - have Co meaning that it has these SCO columns on it. For 00:31:49.864 --> 00:31:50.896 - all these different things. 00:31:51.980 --> 00:31:55.503 - And then if you look at the root concretes, these are the bases 00:31:55.503 --> 00:31:57.942 - of the ones that we can generally inherit throughout 00:31:57.942 --> 00:32:01.194 - these tables, so you have the base. You have the same wall 00:32:01.194 --> 00:32:03.633 - base, you're the type of oil based displayable, contactable, 00:32:03.633 --> 00:32:04.988 - contactable actually needs to go 00:32:04.988 --> 00:32:09.750 - away. Because in favor of like people actually using a real 00:32:09.750 --> 00:32:11.198 - context, there are only. 00:32:12.410 --> 00:32:14.534 - Oh, just the account is is all that's left. 00:32:15.730 --> 00:32:18.854 - Yeah, the account is the only table that's still doing that, 00:32:18.854 --> 00:32:22.262 - and it's the only one that's only reason have gotten rid of 00:32:22.262 --> 00:32:25.670 - it yet, because that data just needs to go into their account 00:32:25.670 --> 00:32:29.078 - Contacts, which is the address book, but I have not gotten rid 00:32:29.078 --> 00:32:33.054 - of it off the main account point yet, so at some point I'll be 00:32:33.054 --> 00:32:36.462 - getting rid of that as the last one. That's something that just 00:32:36.462 --> 00:32:39.870 - gives it like phone number field or an email field. Yeah, it 00:32:39.870 --> 00:32:43.562 - gives us because of these three fields I see beyond what a naval 00:32:43.562 --> 00:32:44.982 - base does, phone, fax, and 00:32:44.982 --> 00:32:47.786 - email. Yeah, OK. Yeah, and it's like that information should be 00:32:47.786 --> 00:32:50.630 - in the contact record, so not on the account record itself right 00:32:50.630 --> 00:32:53.711 - where it has, but I haven't gotten rid of it and people are 00:32:53.711 --> 00:32:57.266 - still using it. So like I don't want to just drop it and screw a 00:32:57.266 --> 00:33:00.110 - bunch of people over in less. There's like a known like we're 00:33:00.110 --> 00:33:02.480 - moving on to other stuff. And then there's root interface. 00:33:02.480 --> 00:33:05.324 - Just mirror those and just make the interfaces for them in those 00:33:05.324 --> 00:33:07.778 - files. That's the shared stuff. 00:33:08.350 --> 00:33:12.115 - OK, so we have our new table in here so the next thing I'm going 00:33:12.115 --> 00:33:15.629 - to do is I'm going to build this thing 'cause I need that table 00:33:15.629 --> 00:33:18.641 - class to end up inside the output DLL so that mighty force 00:33:18.641 --> 00:33:20.649 - can read it. So if I build that. 00:33:23.510 --> 00:33:25.650 - One succeeded everything is built there. Now I have some 00:33:25.650 --> 00:33:28.432 - tea force here. I can run and we can see that the T4 00:33:28.432 --> 00:33:31.000 - going to do some stuff. So I'm going to run that one. 00:33:35.260 --> 00:33:37.300 - I want to run that one. You can see that the checkmarks 00:33:37.300 --> 00:33:38.150 - show that it changed it. 00:33:39.440 --> 00:33:43.148 - And we have that one. And then there's actually in the datasets 00:33:43.148 --> 00:33:46.238 - here. There's the identity permissions sets, but I need to 00:33:46.238 --> 00:33:49.946 - run. There's also for people that don't want to re watch the 00:33:49.946 --> 00:33:53.345 - video and see the order. The order that he's running vision 00:33:53.345 --> 00:33:57.362 - is. It does matter, and it's all typed out in new clean oh. 00:33:57.390 --> 00:33:58.615 - Think James actually type that 00:33:58.615 --> 00:34:03.635 - one out. So I think the keywords to search for was just to T4 and 00:34:03.635 --> 00:34:07.600 - order. Yeah, there there is an old one from like 4.6 of stuff. 00:34:07.600 --> 00:34:11.260 - I do have newer instructions that I just typed out in the 00:34:11.260 --> 00:34:14.310 - last 24 hours. That's very simplified, but it doesn't and 00:34:14.310 --> 00:34:17.665 - it only has a couple of Screenshots, but I need to 00:34:17.665 --> 00:34:21.630 - update that 1 from 4.6 with all the latest info that states that 00:34:21.630 --> 00:34:25.595 - like this one is this T4 is not inside those instructions, so I 00:34:25.595 --> 00:34:30.170 - need to get that added to it. But now I can go in and start 00:34:30.170 --> 00:34:31.695 - monitoring mighty what I have. 00:34:31.700 --> 00:34:37.301 - Changed since. And see like what I'm going to do. So like here's 00:34:37.301 --> 00:34:38.556 - my 2 new tables here. 00:34:39.110 --> 00:34:40.909 - So add those two to my thing 00:34:40.909 --> 00:34:45.400 - here. I'm going to start by that and then so like here's my 00:34:45.400 --> 00:34:49.170 - product category where I changed in. I just said we know when the 00:34:49.170 --> 00:34:53.520 - new obsolete is going to be the 2019 to 2020. OK, not a big deal 00:34:53.520 --> 00:34:56.710 - in my product table. I added the product downloads and my 00:34:56.710 --> 00:35:00.480 - download there I can see that I could see that I've done all 00:35:00.480 --> 00:35:04.540 - this stuff and I'm using this as a good double Check Point that I 00:35:04.540 --> 00:35:07.150 - miss something that I should have added. My permissions 00:35:07.150 --> 00:35:08.310 - output automatically added this 00:35:08.310 --> 00:35:11.595 - as a types. It added if I Scroll 00:35:11.595 --> 00:35:15.330 - down. It automatically added crud operations for both of 00:35:15.330 --> 00:35:19.290 - those tables to the permissions list, so we know that this stuff 00:35:19.290 --> 00:35:23.580 - is good. The registry added in the two types that says to the 00:35:23.580 --> 00:35:24.900 - interface to the concrete. 00:35:25.850 --> 00:35:30.350 - And my context points added. The table says DB sets to the 00:35:30.350 --> 00:35:33.129 - interface. And it added them to the concrete. 00:35:34.180 --> 00:35:38.068 - And then it also went through and said for the date columns 00:35:38.068 --> 00:35:42.280 - the created date updated date on both of those tables that it is 00:35:42.280 --> 00:35:45.844 - a datetime two and it has precision supposed to find this 00:35:45.844 --> 00:35:49.084 - stuff here now because Oracle does a different data type 00:35:49.084 --> 00:35:52.324 - column, they don't use daytime too, they use something else. 00:35:52.360 --> 00:35:55.130 - So this is just auto generating those informations you goes 00:35:55.130 --> 00:35:58.454 - manually Add all that info and you can't use them with the 00:35:58.454 --> 00:36:00.947 - attributes anymore because of that stuff because of the 00:36:00.947 --> 00:36:03.717 - differences with Oracle an. Then there are SQL schema attribute 00:36:03.717 --> 00:36:07.041 - is what's generating this point saying that it needs to do to 00:36:07.041 --> 00:36:09.811 - table part download and it's under the schema products on 00:36:09.811 --> 00:36:12.858 - that stuff. So be that these things are identified to entity 00:36:12.858 --> 00:36:15.360 - framework as tables. So all that 00:36:15.360 --> 00:36:18.382 - got done. Inside there and then, the CS project 00:36:18.382 --> 00:36:20.430 - automatically. It's just adding the two lines that 00:36:20.430 --> 00:36:22.990 - said that these two new files are here for that 00:36:22.990 --> 00:36:25.806 - stuff. So now we can see that all that is there. 00:36:27.460 --> 00:36:30.496 - All that stuff is there, and then I'm going to build this 00:36:30.496 --> 00:36:33.785 - again so that we know that it built up and there's no builders 00:36:33.785 --> 00:36:35.303 - or anything that come off of 00:36:35.303 --> 00:36:39.318 - that. Is what we want to see? OK, so that's good. Now we've 00:36:39.318 --> 00:36:42.366 - basically cemented the crux of what the rest of the stuff is 00:36:42.366 --> 00:36:45.414 - going to use for the fact that these tables exist in what 00:36:45.414 --> 00:36:48.462 - they're supposed to do. Do we need to add a migration? Yes, 00:36:48.462 --> 00:36:51.764 - but we're not going to do that until later, in case we find 00:36:51.764 --> 00:36:54.812 - stuff down the line that were like, hey, I should add these 00:36:54.812 --> 00:36:57.860 - other columns too, as I'm making my workflow for stuff so that 00:36:57.860 --> 00:37:00.654 - way I don't have to worry about creating and recreating the 00:37:00.654 --> 00:37:03.702 - migration over and over again. I could just worry about doing it 00:37:03.702 --> 00:37:04.718 - once on that stuff. 00:37:05.610 --> 00:37:08.050 - So now from this point. 00:37:08.690 --> 00:37:13.996 - Most of the T fours happen in the order of what you see in 00:37:13.996 --> 00:37:18.923 - here. As I search for dot TT and this usually takes a second. 00:37:19.470 --> 00:37:22.928 - So if it's just TT include, you don't need to run it, it's just 00:37:22.928 --> 00:37:26.139 - that easy that you need right now. We just ran these three, so 00:37:26.139 --> 00:37:29.350 - these are good and that can collapse that. So as you go down 00:37:29.350 --> 00:37:32.561 - this list from top to bottom is pretty much the order in which 00:37:32.561 --> 00:37:34.290 - you're going to run the T fours. 00:37:34.940 --> 00:37:38.030 - On stuff there's slightly exception in some of the stuff 00:37:38.030 --> 00:37:41.738 - like it matters, but it doesn't matter if it makes sense. It's 00:37:41.738 --> 00:37:44.870 - kind of weird. And I say that it's not as complicated as it 00:37:44.870 --> 00:37:47.717 - might sound. A lot of people have made it into a bigger deal 00:37:47.717 --> 00:37:50.345 - than it ever actually, really bad in real life. So what we're 00:37:50.345 --> 00:37:53.411 - going to do here is we're just going to follow this up and down 00:37:53.411 --> 00:37:56.258 - and I'll walk you through some of these things. We got about 15 00:37:56.258 --> 00:37:58.667 - minutes left, but I am planning to continue this training in 00:37:58.667 --> 00:38:01.514 - next week, so don't worry bout running it over. And I do need 00:38:01.514 --> 00:38:04.142 - it. Hard stop at 5 'cause I have another meeting supposed to 00:38:04.142 --> 00:38:07.826 - start then. OK, so we're going to run this next one here and 00:38:07.826 --> 00:38:09.714 - this is just a mirror of it for 00:38:09.714 --> 00:38:12.791 - the Oracle database. For the permissions one and then there's 00:38:12.791 --> 00:38:15.947 - a mirror of this for the Oracle database of the context that 00:38:15.947 --> 00:38:18.840 - goes and adds it to the appropriate class for the Oracle 00:38:18.840 --> 00:38:22.747 - data model context. And then I'm going to build that class. I'm 00:38:22.747 --> 00:38:23.799 - sorry, build that project. 00:38:25.040 --> 00:38:26.648 - Make sure that we build errors. 00:38:28.470 --> 00:38:31.998 - Bill succeeded. OK, so now I can talk to that guy. And then I'm 00:38:31.998 --> 00:38:33.510 - going to run my models T4. 00:38:34.790 --> 00:38:37.730 - My models interface before I should say and I search 00:38:37.730 --> 00:38:38.612 - models Interface T4. 00:38:39.940 --> 00:38:43.559 - And then you can see what that created was open my 00:38:43.559 --> 00:38:44.546 - git window again. 00:38:47.110 --> 00:38:50.366 - Sort that updated this models doing so. Now we have interface 00:38:50.366 --> 00:38:54.214 - models and then that knows that it's it's. I know base it knows 00:38:54.214 --> 00:38:58.654 - that it's I filter by model and it knows that it has and I type 00:38:58.654 --> 00:39:02.798 - a base model and that it will happen I type model on it. Now 00:39:02.798 --> 00:39:06.350 - the product download type is just a Typo Base with no extra 00:39:06.350 --> 00:39:08.718 - properties. So instead of using generating entirely new 00:39:08.718 --> 00:39:11.678 - interface and class for that stuff it actually just we're 00:39:11.678 --> 00:39:15.526 - going to use the I type model and type model concrete for that 00:39:15.526 --> 00:39:17.302 - so we don't auto process it. 00:39:17.390 --> 00:39:21.746 - Images goes in there. There's a couple of type Oval bases that 00:39:21.746 --> 00:39:26.102 - don't do that and they are run through with an exceptions list 00:39:26.102 --> 00:39:30.732 - inside the. The T4 code generator does has an exceptions 00:39:30.732 --> 00:39:35.984 - list that knows how to ignore that I'm fat. I'm going to go 00:39:35.984 --> 00:39:40.428 - show you that real quick. Believe it's in here and it's 00:39:40.428 --> 00:39:42.448 - the should be help functions. 00:39:43.900 --> 00:39:45.930 - Should I open it in notepad plus plus real quick? 00:39:47.650 --> 00:39:50.675 - Yeah, so this rightness, so says swapped him bottle type. You'll 00:39:50.675 --> 00:39:53.975 - see this inside the T4 code itself. You'll see swap to model 00:39:53.975 --> 00:39:57.550 - type and it will know that like first dates and status is it 00:39:57.550 --> 00:40:00.575 - just always use that as model? Always use state model instead 00:40:00.575 --> 00:40:03.600 - of creating individual ones for these. You know item types that 00:40:03.600 --> 00:40:06.900 - are on the sales collections it uses that one for the target 00:40:06.900 --> 00:40:10.750 - types it uses that one and then if it's a type then it's going 00:40:10.750 --> 00:40:12.675 - to do that unless it's one of 00:40:12.675 --> 00:40:15.098 - these. Now there's like 30. 00:40:15.780 --> 00:40:19.168 - Uh or 40 type tables and this is probably about 1/3 of them. I 00:40:19.168 --> 00:40:22.314 - want to say maybe half that's doing this so in most cases it 00:40:22.314 --> 00:40:25.460 - actually is going to use the single type, but if it's one of 00:40:25.460 --> 00:40:29.090 - these where it has extra stuff on it, it has to do. It is not 00:40:29.090 --> 00:40:32.236 - to do that into Geo had generate the full interface in the full 00:40:32.236 --> 00:40:35.382 - class so that we can implement extra stuff on them and do those 00:40:35.382 --> 00:40:38.044 - things with those things by hope. At some point. We'd also 00:40:38.044 --> 00:40:41.432 - be trying to reduce some of this so that you wouldn't have to do 00:40:41.432 --> 00:40:43.852 - these special overrides, then go back to the basic stuff. 00:40:44.720 --> 00:40:49.075 - And then this one case it actually has to do in a specific 00:40:49.075 --> 00:40:52.080 - name. Of that one, 1st, instead of using the word generally 00:40:52.080 --> 00:40:53.646 - uses, it drops the word general 00:40:53.646 --> 00:40:59.722 - off. Off of it I noticed in that exact value oranges now that 00:40:59.722 --> 00:41:04.082 - there are a couple things that are never referenced anywhere, 00:41:04.082 --> 00:41:10.324 - so I. I've dated a few of them just to use a little 00:41:10.324 --> 00:41:14.988 - more in depth like that is simple type. I'm using it 00:41:14.988 --> 00:41:18.804 - in the TypeScript section because it was never never 00:41:18.804 --> 00:41:20.500 - being used anywhere else. 00:41:21.630 --> 00:41:25.424 - Yeah, OK eight in some of that is like like it has since been 00:41:25.424 --> 00:41:28.134 - deprecated, 'cause like it was stuff that was originally like 00:41:28.134 --> 00:41:31.928 - in a T4 but then got moved to the to the actual C sharp 00:41:31.928 --> 00:41:34.909 - classes that were over there where some of that stuff like 00:41:34.909 --> 00:41:38.703 - just didn't have to exist as a manual there it was able to do 00:41:38.703 --> 00:41:42.226 - it in a different way, so that's just where some of that stuff 00:41:42.226 --> 00:41:45.478 - got lost overtime or not loss but like like like outmoded or 00:41:45.478 --> 00:41:49.543 - if you want to call it that it just got moved out is all but 00:41:49.543 --> 00:41:53.066 - yeah so the RT4 for the models in the search models were both 00:41:53.066 --> 00:41:56.425 - created. Now we know that we have properties we need to take 00:41:56.425 --> 00:42:00.000 - care of with this though, so I'm going to remove the filter. I'm 00:42:00.000 --> 00:42:04.125 - going here and I even went to make a. I'm going to go into my 00:42:04.125 --> 00:42:07.975 - like here. I'm gonna go to the product Model 1 and I know that 00:42:07.975 --> 00:42:09.075 - I need to add. 00:42:09.790 --> 00:42:13.599 - A list here of stuff, so I'm going to do my part category 00:42:13.599 --> 00:42:16.822 - look, copy here and say product download model which it knows 00:42:16.822 --> 00:42:19.752 - about 'cause already run the four. Then we'll see downloads 00:42:19.752 --> 00:42:22.975 - so that my product interface knows that it has this new 00:42:22.975 --> 00:42:27.792 - collection on it. And it's using the appropriate stuff for that. 00:42:27.792 --> 00:42:33.239 - And then down here. Below this I'm going to go ahead and create 00:42:33.239 --> 00:42:37.010 - a public partial interface. I product download and I 00:42:37.010 --> 00:42:40.781 - misspelled that. So we're going to do that now. 00:42:41.400 --> 00:42:45.921 - We know that this guy is I'm sorry. Product download model. 00:42:46.660 --> 00:42:49.240 - We know that this guy exists in the other Spotify control and 00:42:49.240 --> 00:42:52.035 - click it. It will take me over to the other one that's inside 00:42:52.035 --> 00:42:54.615 - the four output and we can see the properties that is already 00:42:54.615 --> 00:42:58.187 - created for that stuff. But I also know that I need to compare 00:42:58.187 --> 00:43:03.150 - this against my. My original that is in my data model to grab 00:43:03.150 --> 00:43:04.200 - my extra properties. 00:43:05.000 --> 00:43:08.654 - So we have these and we need to grab them and copy them into 00:43:08.654 --> 00:43:12.047 - here. So we're going to say the same thing here now. In some 00:43:12.047 --> 00:43:15.440 - cases you might have it where like the model might be like a 00:43:15.440 --> 00:43:17.789 - nullable versus Nonmobile where the original isn't, so that 00:43:17.789 --> 00:43:20.660 - would be. This would be the place where you could start 00:43:20.660 --> 00:43:23.531 - implementing some of those changes if you need to, but I 00:43:23.531 --> 00:43:27.446 - don't need to do that in this case, so I'm just going to R and 00:43:27.446 --> 00:43:30.317 - do that, and I'm going to physically use resharper to just 00:43:30.317 --> 00:43:32.144 - move it over to its own file. 00:43:33.330 --> 00:43:36.806 - And it has a template header that doesn't quite work great, 00:43:36.806 --> 00:43:41.230 - so I need to give that corrected and dropped out to that and now 00:43:41.230 --> 00:43:44.390 - we have our public download product download model which has 00:43:44.390 --> 00:43:47.550 - are three properties that we care about their ***** all 00:43:47.550 --> 00:43:50.710 - getting inherited by interfaces on those parts for the interface 00:43:50.710 --> 00:43:52.606 - layer and then we have our. 00:43:52.930 --> 00:43:56.307 - Product download model that I actually want to look at, which 00:43:56.307 --> 00:43:57.842 - is the product download search 00:43:57.842 --> 00:44:01.936 - model. So we want to make sure that it's filter by product. 00:44:01.936 --> 00:44:06.080 - Well, the search button is going to take care of that for us by 00:44:06.080 --> 00:44:08.152 - inheriting those those properties. It's also searchable 00:44:08.152 --> 00:44:11.704 - by the enable based properties and then having to type so we 00:44:11.704 --> 00:44:13.480 - can use those concretes in our 00:44:13.480 --> 00:44:16.874 - workflows later. So that takes care of that part. 00:44:16.874 --> 00:44:18.042 - Let's build this guy. 00:44:19.210 --> 00:44:23.242 - And then we move on to the next T4 already know what is this 00:44:23.242 --> 00:44:26.122 - right here we run in associations workflow and we run 00:44:26.122 --> 00:44:29.084 - workloads TT. Back to back. And then I'm going to build 00:44:29.084 --> 00:44:29.868 - those two real quick. 00:44:31.400 --> 00:44:33.930 - And then we look inside of this file and we can 00:44:33.930 --> 00:44:35.080 - see that it has created. 00:44:37.020 --> 00:44:41.140 - More stuff. I'm going to add my new partial that we created. 00:44:42.700 --> 00:44:47.188 - And we can see the associations workflow. It added a associate 00:44:47.188 --> 00:44:50.860 - product, product downloads, workflow. So it's the on the 00:44:50.860 --> 00:44:53.716 - original product entity. It's adding the collection. 00:44:54.450 --> 00:44:56.871 - Product downloads and it's the Associate Workflow for that 00:44:56.871 --> 00:45:00.099 - which inherits the base one and tells it what the basic the 00:45:00.099 --> 00:45:03.596 - properties are that it needs for that. And then we Scroll down a 00:45:03.596 --> 00:45:06.017 - bit and you know product download doesn't have any 00:45:06.017 --> 00:45:07.900 - associations. Portal type doesn't have any associations, 00:45:07.900 --> 00:45:11.666 - but it is listing it out that it's aware of them and then we 00:45:11.666 --> 00:45:14.894 - Scroll down here and then. This is a on the workflows controller 00:45:14.894 --> 00:45:18.660 - which is our poor man die for this stuff to make some of this 00:45:18.660 --> 00:45:21.619 - stuff happen. I do eventually need to refactor this thing out, 00:45:21.619 --> 00:45:24.847 - but it's you so so much it would be really hard to. 00:45:24.920 --> 00:45:28.990 - Take that out so we have our associate product downloads 00:45:28.990 --> 00:45:32.653 - reference here for the workflows controller that will happen 00:45:32.653 --> 00:45:34.688 - later and then the workflows 00:45:34.688 --> 00:45:38.171 - itself. We now have our product download workflow and our 00:45:38.171 --> 00:45:40.861 - product download type workflow. They both inherit a mobile base 00:45:40.861 --> 00:45:44.089 - and then type of oil base and they pass in the appropriate 00:45:44.089 --> 00:45:47.317 - interfaces for this stuff. So it basically set up all that stuff 00:45:47.317 --> 00:45:50.814 - for us and then if we were to if we needed additional functions 00:45:50.814 --> 00:45:53.773 - that were custom beyond what we were inheriting we would go 00:45:53.773 --> 00:45:56.194 - create a partial workflow interface for each of these 00:45:56.194 --> 00:45:58.346 - things in order to add additional functionality on 00:45:58.346 --> 00:46:02.112 - them. I have not identified any of that stuff that I need to do 00:46:02.112 --> 00:46:05.878 - yet, so I'm going to leave them alone and then I also adds those 00:46:05.878 --> 00:46:09.300 - two onto the. Workloads controller as well, so you have 00:46:09.300 --> 00:46:11.100 - the direct reference on those 00:46:11.100 --> 00:46:14.771 - workloads controller. So all that stuff kind of gets in here 00:46:14.771 --> 00:46:17.878 - did for us and just imagine having to type all that crap out 00:46:17.878 --> 00:46:21.224 - by hand, which used to do a very long time ago. But now all 00:46:21.224 --> 00:46:22.658 - that's taken care of for us. 00:46:23.540 --> 00:46:28.076 - So looks like this guy, I did a build on that thing and it's 00:46:28.076 --> 00:46:31.640 - complaining it down here that this is not inheriting yet, but 00:46:31.640 --> 00:46:34.880 - we haven't gotten that layer yet, so that's why it's 00:46:34.880 --> 00:46:38.768 - complaining about that. That is not done yet, so let's go in 00:46:38.768 --> 00:46:42.656 - here and let's run those T Fours again. So let's run you. 00:46:43.680 --> 00:46:45.800 - And let's run you. 00:46:50.890 --> 00:46:54.180 - And I'm going to go ahead and say that this is the last thing 00:46:54.180 --> 00:46:57.235 - I'm going to run here. I'm going to add that one partial over 00:46:57.235 --> 00:47:00.640 - here real quick. Because we are at a time and I want to give a 00:47:00.640 --> 00:47:02.740 - moment for a couple of questions to be able to go out. 00:47:03.400 --> 00:47:05.227 - Before you get catch up on this 00:47:05.227 --> 00:47:09.406 - next time. K so we're gonna do. I'm gonna do my security but 00:47:09.406 --> 00:47:13.124 - this one here and copy that and say instead of ship carry method 00:47:13.124 --> 00:47:14.268 - I'm going to say. 00:47:15.290 --> 00:47:24.880 - Gal. 2345678 00:47:25.900 --> 00:47:28.595 - There we go. So now product downloads implemented an to make 00:47:28.595 --> 00:47:31.780 - it so that you're not scrolling over to see what it looks like. 00:47:31.780 --> 00:47:33.495 - I'm going to do this real quick. 00:47:34.130 --> 00:47:35.578 - So you can see what all it's doing. 00:47:36.940 --> 00:47:40.237 - So the parts that we are adding 00:47:40.237 --> 00:47:44.566 - is this. We have this here using the concrete. Our interface 00:47:44.566 --> 00:47:48.214 - layer is only aware of other interfaces, so we have to use 00:47:48.214 --> 00:47:51.862 - the explicit implementation and that it has to cast it out in 00:47:51.862 --> 00:47:55.510 - and out. The reason we have to do this is because Serialising 00:47:55.510 --> 00:47:58.246 - interfaces is not a thing or other deserializing interfaces 00:47:58.246 --> 00:48:02.198 - isn't. The thing is, it doesn't know what to use and it confuses 00:48:02.198 --> 00:48:05.238 - the service tech layer and the JSON like Newtonsoft Jason 00:48:05.238 --> 00:48:08.886 - Thing, it doesn't know what to use because it could be anything 00:48:08.886 --> 00:48:11.622 - that would implement the interface which could be any 00:48:11.622 --> 00:48:15.040 - number of things. So we have to tell it which concrete use When 00:48:15.040 --> 00:48:17.540 - it deserializes with this part. And that is really unfortunate, 00:48:17.540 --> 00:48:20.540 - but it was something that we found out the hard way many 00:48:20.540 --> 00:48:24.040 - years ago, so we have to write all this extra stuff on this to 00:48:24.040 --> 00:48:26.540 - do this sector thing. People some people have explored ways 00:48:26.540 --> 00:48:30.290 - of trying to make it do this in a better way. By saying that we 00:48:30.290 --> 00:48:33.040 - have to have constructors that do all this other stuff. None 00:48:33.040 --> 00:48:36.040 - of that has ever been practical that we have been able to 00:48:36.040 --> 00:48:36.290 - determine. 00:48:37.480 --> 00:48:40.792 - As far as actually like trying to maintain this stuff long term 00:48:40.792 --> 00:48:44.104 - because some of the some of it ends up being like circular 00:48:44.104 --> 00:48:46.864 - references wherein like this ones depending on this other one 00:48:46.864 --> 00:48:50.728 - that's also depend on this other one, so it ends up in a circular 00:48:50.728 --> 00:48:53.764 - reference. There's no way to resolve out like which one has 00:48:53.764 --> 00:48:57.076 - to come first. Chicken or the egg, and in other cases it's 00:48:57.076 --> 00:49:00.388 - been it worked again. One thing like it worked in the newtonsoft 00:49:00.388 --> 00:49:03.424 - one, but it didn't work in service stack or vice versa. 00:49:03.430 --> 00:49:07.402 - And to implement both would get ridiculous as well, and this was 00:49:07.402 --> 00:49:11.043 - easier to implement than trying to do both of those individual 00:49:11.043 --> 00:49:13.332 - things. So we ended up with that 00:49:13.332 --> 00:49:19.764 - stuff. But we have a product model there and then just like 00:49:19.764 --> 00:49:24.604 - before, I'm going to make my public partial class product 00:49:24.604 --> 00:49:29.860 - down. Download model and then I'm going to add my properties. 00:49:30.620 --> 00:49:32.396 - That I need. In fact I can just 00:49:32.396 --> 00:49:34.840 - straight up do. The. 00:49:35.420 --> 00:49:39.140 - As soon as it wants to do, we want to implement missing 00:49:39.140 --> 00:49:42.240 - members, add those members in. It automatically inherits all of 00:49:42.240 --> 00:49:46.270 - them. We on these models it's a best practice to add API members 00:49:46.270 --> 00:49:50.300 - as you go in. In fact, all of these should have API members, 00:49:50.300 --> 00:49:54.406 - but they don't. Which is annoying and it's not good. And 00:49:54.406 --> 00:49:58.330 - then you say simple stuff here. I'm actually just going to copy 00:49:58.330 --> 00:50:02.650 - this guy. That way I have my structure out. I can drop this. 00:50:02.650 --> 00:50:04.730 - Here is a type of data type of 00:50:04.730 --> 00:50:09.627 - Bool. Broward typist bodies required no. And then say that. 00:50:10.420 --> 00:50:14.600 - I might do the base symbol for this and copy the. 00:50:15.810 --> 00:50:17.590 - Uh, like this piece. 00:50:18.400 --> 00:50:22.014 - Into what's going to go into my description tag here and do the 00:50:22.014 --> 00:50:26.146 - same thing? So if I grab this and Drop it there and there and 00:50:26.146 --> 00:50:27.634 - then I just change this to 00:50:27.634 --> 00:50:32.444 - string. String that I have to make sure that I replace these 00:50:32.444 --> 00:50:35.784 - values here and here. None of these are required. Technically 00:50:35.784 --> 00:50:37.454 - attacking this actually would be 00:50:37.454 --> 00:50:40.425 - required. Because it is not a 00:50:40.425 --> 00:50:44.360 - nullable. And then I need to go down to my base 00:50:44.360 --> 00:50:45.705 - symbols on these an grab. 00:50:47.390 --> 00:50:49.700 - That and Drop it there. 00:50:50.720 --> 00:50:53.569 - And then drop that there and I can just say relative. 00:50:54.800 --> 00:50:58.120 - Uh. She 00:50:58.120 --> 00:51:05.076 - be. And I think that that would be slightly smarter 00:51:05.076 --> 00:51:08.640 - than saying what this is saying. 00:51:10.420 --> 00:51:14.254 - Twice and now the URL of the relative well. 00:51:16.560 --> 00:51:20.268 - That's not necessarily the best English the relative URL. 00:51:23.080 --> 00:51:27.601 - To initiate the download and then I'm going to do this 00:51:27.601 --> 00:51:32.122 - here, copy the word absolute over relative and get rid of 00:51:32.122 --> 00:51:34.999 - the duplicant boom, better, better documentation, great. 00:51:38.270 --> 00:51:42.572 - OK. So that's kind of that point. There. We are at 5:00 00:51:42.572 --> 00:51:45.674 - o'clock. I'm going to move this to its own open file. 00:51:48.750 --> 00:51:51.603 - Kill the one that Autogenerated and generate my own. 00:51:52.240 --> 00:51:56.848 - And I don't need that socially that off, and now it will 00:51:56.848 --> 00:52:01.456 - happen. Member tags for all that stuff and on there and this 00:52:01.456 --> 00:52:05.774 - project. This project should now build where he couldn't before. 00:52:08.670 --> 00:52:11.838 - And you need this one built before you do the mapping. One 00:52:11.838 --> 00:52:14.742 - because of what it's doing with the mapping 1 looks like 00:52:14.742 --> 00:52:15.798 - this one is complaining. 00:52:17.030 --> 00:52:19.490 - About something build real quick and see if it's just 00:52:19.490 --> 00:52:20.966 - going to take care of it. 00:52:22.000 --> 00:52:23.337 - You might just take care of itself. 00:52:25.490 --> 00:52:32.738 - Why is it complaining about that? 00:52:34.260 --> 00:52:35.820 - There is no. 00:52:37.400 --> 00:52:41.180 - Thing that goes from there to a mobile base, but it is 00:52:41.180 --> 00:52:42.125 - a mobile base. 00:52:44.640 --> 00:52:51.470 - Oh, because I didn't do a certain thing yet, so 00:52:51.470 --> 00:52:57.617 - I product download. I missed something kind of crucial. 00:52:59.400 --> 00:53:02.490 - This. Is supposed to be nameable 00:53:02.490 --> 00:53:09.106 - base. Whoops, that's going to influence a 00:53:09.106 --> 00:53:10.928 - few things. 00:53:15.360 --> 00:53:16.540 - Now it should be happy. 00:53:19.520 --> 00:53:20.988 - Since this thing refreshes. 00:53:22.710 --> 00:53:24.166 - There it goes. OK now it's happy. 00:53:26.690 --> 00:53:27.922 - So we can build that and should 00:53:27.922 --> 00:53:30.590 - work. And then I'll just build this again to be sure. 00:53:35.010 --> 00:53:42.368 - OK, so we're going to stop there. It will pick this up with 00:53:42.368 --> 00:53:45.198 - the mapping layer next week.