All language subtitles for CRUD w_ Blazor in .NET 8 -- All Render Modes (SSR_ Server_ Wasm_ Auto)_ Entity Framework _ SQL Server(720P_HD)

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,090 --> 00:00:06,719 Hello my dear friends Patrick here and welcome 2 00:00:06,719 --> 00:00:07,470 to the karate tutorial for blazer in dot net 3 00:00:07,680 --> 00:00:13,530 eight boy this was a rights i already recorded 4 00:00:13,530 --> 00:00:14,430 the tutorial i didn't expect it to be that long 5 00:00:14,610 --> 00:00:15,480 but i covered 6 00:00:15,600 --> 00:00:19,470 everything all the random mods we've got static server side rendering. 7 00:00:19,830 --> 00:00:25,680 We are using stream rendering we're using the new form capabilities meaning. 8 00:00:26,040 --> 00:00:31,110 Service had rendering without web sockets or webassembly 9 00:00:31,110 --> 00:00:32,760 so no interactivity actually but still we can use a form 10 00:00:33,030 --> 00:00:36,240 to for instance create something right create any kind of entity 11 00:00:36,600 --> 00:00:42,660 and then be also used the server random oh note webassembly render mode and also the 12 00:00:42,660 --> 00:00:46,571 auto render mortgages of course server and then webassembly. 13 00:00:46,710 --> 00:00:47,940 I will go 14 00:00:48,090 --> 00:00:49,558 pretty deep actually cover 15 00:00:49,680 --> 00:00:51,990 yeah in in my opinion everything 16 00:00:52,140 --> 00:00:57,090 so you can learn a lot in this tutorial some errors happen because it was kind of 17 00:00:57,090 --> 00:01:02,310 life new experiences here but you live in and right 18 00:01:02,310 --> 00:01:03,900 so i hope you enjoy it and learned a lot and if so 19 00:01:04,140 --> 00:01:06,690 you know the drill please hit the like button. 20 00:01:07,080 --> 00:01:11,520 Subscribe to my channel does make a difference so thank you so much for doing that 21 00:01:11,580 --> 00:01:16,290 and if you want to support me scroll a bit further down there is the link to my 22 00:01:16,290 --> 00:01:21,180 patriot page so all my patrons thank you so so much for supporting the already 23 00:01:21,450 --> 00:01:23,740 i will love you forever. 24 00:01:23,850 --> 00:01:24,480 Ants 25 00:01:24,720 --> 00:01:25,770 if you're still here 26 00:01:25,920 --> 00:01:31,470 make sure to check out the link for the twenty 27 00:01:31,500 --> 00:01:32,160 twenty four edition of the dot net web academy 28 00:01:32,370 --> 00:01:33,720 where we of course. 29 00:01:34,020 --> 00:01:37,350 Cover everything dot net eight related meaning 30 00:01:37,500 --> 00:01:38,970 web a p i 31 00:01:39,240 --> 00:01:41,021 and also blazer. 32 00:01:41,160 --> 00:01:43,301 Now server web assembly as 33 00:01:43,440 --> 00:01:43,740 are 34 00:01:43,950 --> 00:01:45,240 whatever you can think of 35 00:01:45,540 --> 00:01:49,650 everything with dot net eight so this is what we going to do in the upcoming done by 36 00:01:49,650 --> 00:01:53,310 macadam Ketamine so make sure to check out the link in the bitter description to join 37 00:01:53,370 --> 00:01:56,970 that waiting list now without further do enjoy the tutorial 38 00:01:57,120 --> 00:02:01,140 all right so here we are better suited twenty twenty two is the preview edition one. 39 00:02:01,740 --> 00:02:02,740 And 40 00:02:02,909 --> 00:02:06,360 i can tell you already this will be interesting because when we. 41 00:02:06,690 --> 00:02:10,440 Now a filter for the plays the template see you see before the please a web app 42 00:02:10,830 --> 00:02:14,520 and the blizzard webassembly stand alone it but this is the new stuff right 43 00:02:14,730 --> 00:02:17,820 so here this is still older stuff you can use 44 00:02:18,090 --> 00:02:21,120 but you see that blazer whip assembly you will you have the. 45 00:02:21,480 --> 00:02:23,250 Mt application here. 46 00:02:23,790 --> 00:02:24,790 But 47 00:02:24,990 --> 00:02:26,770 for dot net eight. 48 00:02:27,000 --> 00:02:29,850 We actually only have Blaze a webapp and blazer 49 00:02:30,062 --> 00:02:31,259 assembly standalone app. 50 00:02:31,560 --> 00:02:34,170 Quick word about blazer webassembly stand alone 51 00:02:34,410 --> 00:02:36,420 when we go here 52 00:02:36,600 --> 00:02:37,950 just click this through 53 00:02:38,160 --> 00:02:43,320 you see that we have no as peanut corp hosted option right so when we create this 54 00:02:43,440 --> 00:02:47,050 you see it's only one project only the client project. 55 00:02:47,100 --> 00:02:50,700 Big advantage is you can still use azure static 56 00:02:50,700 --> 00:02:51,420 web apps for that for instance to deploy this 57 00:02:51,870 --> 00:02:52,870 but. 58 00:02:52,980 --> 00:02:55,890 No web api i in here so. 59 00:02:56,280 --> 00:02:57,390 This is 60 00:02:57,600 --> 00:03:02,520 somehow what you used to when you're coming from that the Blaze a whip assembly team. 61 00:03:03,030 --> 00:03:07,080 But the files have changed a little bit structure changed a little bit and you only 62 00:03:07,080 --> 00:03:12,030 have the climb project here so no web api i of course you can still built you are at 63 00:03:12,030 --> 00:03:15,600 your baby i project here and a chef project and then you 64 00:03:15,600 --> 00:03:17,130 have the architecture that you probably already used to. 65 00:03:17,520 --> 00:03:18,780 With thousand and seven for instance 66 00:03:19,110 --> 00:03:19,650 but what 67 00:03:19,950 --> 00:03:21,480 i think Microsoft wants us 68 00:03:21,630 --> 00:03:25,710 to use is the new blazer a web app template so let's just do that. 69 00:03:26,310 --> 00:03:31,570 And then i will show you all the random out so blase a web app it is. 70 00:03:31,890 --> 00:03:33,659 And we called is now a blazer. 71 00:03:33,990 --> 00:03:34,990 Karate. 72 00:03:35,250 --> 00:03:36,420 Dot net. 73 00:03:36,750 --> 00:03:41,872 Aids all rights now i'm using here the preview 74 00:03:41,932 --> 00:03:42,932 edition or the rc to release can it to. 75 00:03:42,990 --> 00:03:48,810 But in my experience not a lot will change for the 76 00:03:48,810 --> 00:03:50,350 final release so we can still use this version here. 77 00:03:50,430 --> 00:03:50,970 What. 78 00:03:51,332 --> 00:03:56,100 We now see is that we've got authentication types 79 00:03:56,100 --> 00:03:56,670 or actually one type that we can choose from 80 00:03:56,910 --> 00:03:59,260 with that we already gets. 81 00:03:59,340 --> 00:04:04,620 Razor components for identity the that's nice but this is for another video. 82 00:04:04,950 --> 00:04:07,170 Be configured this bright GPS standard stuff. 83 00:04:07,710 --> 00:04:11,470 And now comes the interesting stuff and when you have a look here. 84 00:04:11,550 --> 00:04:12,900 I told you that already in a 85 00:04:13,110 --> 00:04:14,370 couple of videos but 86 00:04:14,490 --> 00:04:16,900 let's just recap this real quick. 87 00:04:16,950 --> 00:04:21,750 So when you say interactivity type is none then you've got service had rendering but 88 00:04:21,750 --> 00:04:24,210 not the blazers survey type with websockets 89 00:04:24,360 --> 00:04:26,700 you've got static server side rendering 90 00:04:26,970 --> 00:04:28,420 so your. 91 00:04:28,650 --> 00:04:30,960 Results your htm l will be built 92 00:04:31,110 --> 00:04:34,120 on the server and the client gets than the finished. 93 00:04:34,290 --> 00:04:36,540 Html the finished file finished stuff 94 00:04:36,750 --> 00:04:37,230 so so 95 00:04:37,380 --> 00:04:41,310 no websocket connection and no webassembly downloaded to the client 96 00:04:41,490 --> 00:04:44,020 but this is the different of course with. 97 00:04:44,160 --> 00:04:45,030 Interactivity type 98 00:04:45,180 --> 00:04:49,020 server which also called the render mode you will see that when we used the or 99 00:04:49,290 --> 00:04:50,440 the attributes. 100 00:04:50,520 --> 00:04:55,620 And we also have the interactivity type or render mode web assembly and then both 101 00:04:55,830 --> 00:04:56,550 is auto 102 00:04:56,790 --> 00:05:01,320 know this means this is the blazers service 103 00:05:01,320 --> 00:05:01,980 stuff you know from dot net seven and before 104 00:05:02,280 --> 00:05:03,720 so here we will. 105 00:05:04,320 --> 00:05:09,570 Open a websocket connection that is active and you have interactivity meaning when 106 00:05:09,570 --> 00:05:13,740 you click on a button then something will probably happen 107 00:05:13,740 --> 00:05:15,060 the server knows that you have clicked on that button. 108 00:05:15,630 --> 00:05:17,280 This will not work when you select 109 00:05:17,430 --> 00:05:20,640 none because then you only have a static website you can add. 110 00:05:20,970 --> 00:05:22,320 As many buttons as you want 111 00:05:22,620 --> 00:05:23,970 but no button will do 112 00:05:24,090 --> 00:05:25,090 anything. 113 00:05:25,200 --> 00:05:28,630 Except maybe a hover effect click effect or something. 114 00:05:28,830 --> 00:05:34,920 Webassembly similar to server you've got into activity but not with web sockets this 115 00:05:34,920 --> 00:05:38,460 time you're using well webassembly so 116 00:05:38,760 --> 00:05:39,570 we have. 117 00:05:39,960 --> 00:05:42,600 The code in essence download it to the clients 118 00:05:43,080 --> 00:05:45,190 and you can use 119 00:05:45,390 --> 00:05:47,610 your buttons your forms whatever you want to use 120 00:05:47,820 --> 00:05:48,510 even 121 00:05:48,630 --> 00:05:50,910 way when you're offline or right still works 122 00:05:51,180 --> 00:05:53,070 does not the case with a websocket connection here 123 00:05:53,340 --> 00:05:54,960 and also now means 124 00:05:55,230 --> 00:05:56,230 that. 125 00:05:56,520 --> 00:06:02,730 Your interactive component or page will start using a websocket connection 126 00:06:02,910 --> 00:06:05,970 but in the background the wasn't files will be downloaded 127 00:06:06,240 --> 00:06:08,610 and when you then visit this page again 128 00:06:08,760 --> 00:06:09,480 the is important 129 00:06:09,690 --> 00:06:12,360 when you for instance reload this page then not 130 00:06:12,570 --> 00:06:13,440 while you're. 131 00:06:14,010 --> 00:06:17,820 On that page for the very first time there's another 132 00:06:17,820 --> 00:06:19,230 not a switch happening from websocket to web assembly 133 00:06:19,500 --> 00:06:20,250 on the fly 134 00:06:20,520 --> 00:06:24,330 this just means that the wasn't files will be downloaded in the background 135 00:06:24,720 --> 00:06:25,560 and then 136 00:06:25,740 --> 00:06:27,970 when you visit this page again 137 00:06:28,140 --> 00:06:31,530 and your present Rosa nose or sees oh we've got the wasn't files 138 00:06:31,680 --> 00:06:32,220 are ready 139 00:06:32,400 --> 00:06:35,490 then this will be used instead of the websocket connection 140 00:06:35,670 --> 00:06:36,600 pretty nice stuff. 141 00:06:37,050 --> 00:06:40,710 Actually but let's just see how it works fall across operation 142 00:06:41,010 --> 00:06:45,130 still i want to select this thing here because with that. 143 00:06:45,240 --> 00:06:45,900 I get 144 00:06:46,020 --> 00:06:51,000 to projects a blazer serve a project in essence which is also a web a p i if you want 145 00:06:51,000 --> 00:06:52,800 all the a p i capabilities are there. 146 00:06:53,310 --> 00:06:54,310 And. 147 00:06:54,870 --> 00:06:57,810 We also got another project for all the 148 00:06:57,810 --> 00:06:58,020 webassembly assembly stuff but let's have a look. 149 00:06:58,410 --> 00:07:00,000 At that in a minute 150 00:07:00,120 --> 00:07:03,940 and one more thing we can configure here is interactivity location 151 00:07:04,260 --> 00:07:06,900 and as is also new with or release candidate to 152 00:07:07,080 --> 00:07:08,530 this just means. 153 00:07:08,580 --> 00:07:13,330 When you for inst since say okay i want interactivity type server. 154 00:07:13,890 --> 00:07:19,440 And then also global then this is in essence 155 00:07:19,440 --> 00:07:19,650 a blazer server application as you know it 156 00:07:19,920 --> 00:07:21,960 from dot net seven and before 157 00:07:22,080 --> 00:07:23,910 not totally the case 158 00:07:24,030 --> 00:07:28,290 with this configuration here because you get 159 00:07:28,290 --> 00:07:28,890 another project an extra project for web assembly 160 00:07:29,100 --> 00:07:34,050 where the then the Blaze a server project is 161 00:07:34,050 --> 00:07:35,050 your web a p i a peanut corp hosted right. 162 00:07:35,190 --> 00:07:39,180 And then also another projects for your components i know and now it's getting 163 00:07:39,180 --> 00:07:42,030 complicated so let's just have a look at all that 164 00:07:42,330 --> 00:07:43,050 and i hope 165 00:07:43,260 --> 00:07:44,650 that then everything. 166 00:07:44,970 --> 00:07:49,858 Becomes clearer now here include sample pages this just means that you get the the 167 00:07:49,860 --> 00:07:52,900 typical weather forecast for instance and the counter example. 168 00:07:53,310 --> 00:07:56,250 And when you don't check this then you've got 169 00:07:56,550 --> 00:08:01,620 the same stuff you've got with the older empty 170 00:08:01,626 --> 00:08:01,893 templates all right so let's just at the. 171 00:08:02,430 --> 00:08:04,920 Examples so again dot net eight r 172 00:08:05,100 --> 00:08:06,570 to in this example 173 00:08:06,750 --> 00:08:11,700 auto interactivity types of got servant of and represents the and per page 174 00:08:11,820 --> 00:08:12,820 components. 175 00:08:12,900 --> 00:08:17,130 Let's sit create and then let's have a look alright we are already here real quick 176 00:08:17,160 --> 00:08:24,360 the dot net web academy twenty twenty four 177 00:08:24,390 --> 00:08:25,390 edition will be open for enrollment very soon. 178 00:08:25,440 --> 00:08:30,270 In there we will cover everything dot net eight related meaning web api eyes 179 00:08:30,540 --> 00:08:31,410 and blazer 180 00:08:31,530 --> 00:08:35,340 webassembly server static server side rendering stream rendering 181 00:08:35,640 --> 00:08:39,270 everything you can think of everything done at aid related this is what we are going 182 00:08:39,270 --> 00:08:41,400 to do there and we will have a deeper look. 183 00:08:41,760 --> 00:08:42,360 At the 184 00:08:42,480 --> 00:08:47,160 architecture there as well so how would you now build your solution what project 185 00:08:47,190 --> 00:08:51,210 should you create if you wanna beat the first 186 00:08:51,219 --> 00:08:51,689 to know note when this thing is available. 187 00:08:51,994 --> 00:08:55,260 A bit further down in the video description you will find the link and now let's 188 00:08:55,260 --> 00:08:59,593 continue with the tutorial i also wanna already won a state. 189 00:08:59,880 --> 00:09:02,414 Because this was important for me i. 190 00:09:02,610 --> 00:09:04,020 M used to 191 00:09:04,290 --> 00:09:09,810 web assembly as peanut corp hosted i laughed that architecture because they're 192 00:09:10,050 --> 00:09:12,510 you had your client project which 193 00:09:12,660 --> 00:09:16,680 was well the client the user interface right so you've got all your 194 00:09:16,980 --> 00:09:19,590 pages your components there you see now here 195 00:09:19,920 --> 00:09:21,239 to projects with 196 00:09:21,600 --> 00:09:23,370 blazer components pages and so on. 197 00:09:23,910 --> 00:09:29,010 And then you also had your web a p i n de shared project 198 00:09:29,010 --> 00:09:30,360 awesome stuff because this is what fascinated me. 199 00:09:30,720 --> 00:09:33,960 When i saw blades a representative for the very first time you've got your client 200 00:09:33,960 --> 00:09:38,190 project or server project everything with dot net nc shop and also a shared project. 201 00:09:38,610 --> 00:09:39,990 You could host everything 202 00:09:40,200 --> 00:09:41,460 on azure and 203 00:09:41,640 --> 00:09:43,810 both of the back and the server. 204 00:09:44,250 --> 00:09:44,940 And client 205 00:09:45,150 --> 00:09:45,720 the front and 206 00:09:45,840 --> 00:09:48,780 could use the the entities from the share project for instance. 207 00:09:49,320 --> 00:09:52,950 Amazing stuff when you're coming from angular for instance as i 208 00:09:53,100 --> 00:09:53,430 am 209 00:09:53,580 --> 00:09:58,140 then you know that you would have to create your objects on your back end and for the 210 00:09:58,140 --> 00:10:01,770 web web a b i and stuff and also the same while you should 211 00:10:02,010 --> 00:10:04,500 at least an hour javascript you don't have to but 212 00:10:04,620 --> 00:10:05,340 would be nice 213 00:10:05,610 --> 00:10:06,690 to create your 214 00:10:06,870 --> 00:10:09,540 entities there or the your dios there as well. 215 00:10:09,840 --> 00:10:10,800 Not the case your huh. 216 00:10:11,362 --> 00:10:12,168 Could use both 217 00:10:12,378 --> 00:10:17,298 we can still do it but we have to think differently i know 218 00:10:17,298 --> 00:10:18,918 I've talking a lot about that but it is important to me 219 00:10:19,158 --> 00:10:20,838 anything it is important to stay that the. 220 00:10:21,528 --> 00:10:25,818 The way we will develop blazer apps in the future may change 221 00:10:25,938 --> 00:10:28,067 if you still want to use webassembly if you 222 00:10:28,188 --> 00:10:31,648 only want to use server then not a lot will change. 223 00:10:31,818 --> 00:10:32,508 Actually 224 00:10:32,658 --> 00:10:34,188 i think bear with me here. 225 00:10:34,608 --> 00:10:35,072 This is a 226 00:10:35,230 --> 00:10:35,838 new stuff. 227 00:10:36,138 --> 00:10:37,618 Not that experienced. 228 00:10:38,088 --> 00:10:41,098 Yet but of course i will. 229 00:10:41,309 --> 00:10:42,258 I will try 230 00:10:42,378 --> 00:10:46,158 to answer your questions and the well provide more videos about that stuff. 231 00:10:46,578 --> 00:10:48,888 Anyways let's just run this and then we'll see. 232 00:10:49,248 --> 00:10:51,828 What is actually going to happen in the browser ah 233 00:10:51,978 --> 00:10:52,608 so 234 00:10:52,788 --> 00:10:53,778 there we 235 00:10:53,898 --> 00:10:57,558 are and let's just open the console because of this 236 00:10:57,558 --> 00:10:58,518 is important we have to see what's going on there. 237 00:10:58,908 --> 00:10:59,958 Here now. 238 00:11:00,378 --> 00:11:02,718 The hello world page the home page. 239 00:11:03,078 --> 00:11:04,878 Static rendering okay 240 00:11:05,088 --> 00:11:06,468 let's have a look at the coat 241 00:11:06,618 --> 00:11:09,438 here we've got our pages home 242 00:11:09,618 --> 00:11:12,168 and you see nothing is here know no. 243 00:11:12,618 --> 00:11:14,958 Random mode what so ever 244 00:11:15,228 --> 00:11:18,778 this is different here on the counter page. 245 00:11:18,888 --> 00:11:22,398 We see this attribute render mode interactivity. 246 00:11:22,788 --> 00:11:26,268 One more hints about that on this official blog post here. 247 00:11:26,808 --> 00:11:29,958 By and den a roth release candidate to 248 00:11:30,108 --> 00:11:34,138 we see that they choose changed the. 249 00:11:34,218 --> 00:11:36,288 Attribute actually them event yet there is 250 00:11:36,408 --> 00:11:39,539 so here now you see the old way is. 251 00:11:39,648 --> 00:11:40,848 Already the old way. 252 00:11:41,268 --> 00:11:44,568 Air to use the attribute render mode and then whatever you want to use 253 00:11:44,808 --> 00:11:50,940 the new way will be with the or release the official release of donate. 254 00:11:51,108 --> 00:11:51,978 Maybe you already 255 00:11:52,218 --> 00:11:53,268 half the or 256 00:11:53,418 --> 00:11:55,938 that net aid stk their know r c 257 00:11:56,088 --> 00:11:57,598 one to whatever. 258 00:11:57,768 --> 00:11:59,508 Then you see that you can use 259 00:11:59,748 --> 00:12:04,202 this thing here arrived render mode and then interactive 260 00:12:04,278 --> 00:12:05,658 server but as it can see on here this paragraph above. 261 00:12:06,048 --> 00:12:06,558 That 262 00:12:06,768 --> 00:12:11,298 to be able to use it that way you would also have to 263 00:12:11,298 --> 00:12:12,708 add a using direct is actually be caused by me now go 264 00:12:12,888 --> 00:12:13,788 go back here 265 00:12:13,968 --> 00:12:15,978 and i'm trying to use the random oats 266 00:12:16,128 --> 00:12:17,175 and then 267 00:12:17,298 --> 00:12:20,188 interactive auto for instance. 268 00:12:20,268 --> 00:12:22,218 Visual studio has no idea what i want to do 269 00:12:22,338 --> 00:12:25,668 so what i have to do actually it's not loading at all 270 00:12:25,848 --> 00:12:26,838 i have to and that 271 00:12:26,958 --> 00:12:29,778 like that and maybe i have to rebuild it 272 00:12:29,988 --> 00:12:33,138 or it's still no syntax highlighting what so however 273 00:12:33,288 --> 00:12:34,098 let's try that 274 00:12:34,248 --> 00:12:34,968 yet rebuild 275 00:12:35,148 --> 00:12:35,628 failed 276 00:12:35,748 --> 00:12:38,371 because it doesn't know what this is so you have to add the 277 00:12:38,538 --> 00:12:40,788 random what right or a Eddie using direct of what. 278 00:12:41,238 --> 00:12:41,748 You want to use 279 00:12:42,048 --> 00:12:44,898 the problem i had with this because he was see that in a minute. 280 00:12:45,438 --> 00:12:48,558 That i cannot set the pre rendering flag here 281 00:12:48,678 --> 00:12:53,538 i have to or if i wanted changed the pre rendering and 282 00:12:53,538 --> 00:12:54,219 this is really important again if you're coming from 283 00:12:54,348 --> 00:12:57,648 web assembly maybe you use it i didn't because i build apps 284 00:12:57,768 --> 00:12:57,978 a 285 00:12:58,218 --> 00:12:59,808 it wasn't really important for me but. 286 00:13:00,348 --> 00:13:02,088 If it is important for you 287 00:13:02,268 --> 00:13:02,748 then. 288 00:13:03,138 --> 00:13:03,918 You can 289 00:13:04,188 --> 00:13:06,858 set of the flag here for for instance by default 290 00:13:07,068 --> 00:13:08,508 pre rendering is 291 00:13:08,808 --> 00:13:09,408 enabled. 292 00:13:09,828 --> 00:13:10,878 For server 293 00:13:10,998 --> 00:13:13,188 random mode and web assembly as well 294 00:13:13,458 --> 00:13:17,448 so if this is important to you may you still want to use the attribute here or. 295 00:13:17,829 --> 00:13:20,298 At a little configuration here. 296 00:13:20,658 --> 00:13:24,388 According to the to the post here by you can then set the pre rendering. 297 00:13:24,738 --> 00:13:29,178 Because this has an interesting effects when rebuild our own pages these are the 298 00:13:29,178 --> 00:13:31,188 exempt pages of course they just work. 299 00:13:31,638 --> 00:13:33,588 Let's have a look at them again 300 00:13:33,708 --> 00:13:38,448 all right so here we are again the home page is simply aesthetic rendering when we. 301 00:13:38,838 --> 00:13:41,808 Again have a look at the the developer console and here than 302 00:13:41,958 --> 00:13:43,278 the page this is what 303 00:13:43,398 --> 00:13:44,118 get all right. 304 00:13:44,598 --> 00:13:46,158 Now let's have a laugh look 305 00:13:46,338 --> 00:13:49,468 at the weather page. 306 00:13:49,788 --> 00:13:52,428 You saw that short loading 307 00:13:52,638 --> 00:13:54,448 and he didn't don't see anything. 308 00:13:54,558 --> 00:13:56,388 On let me just try this one more time 309 00:13:56,508 --> 00:13:57,318 there it is 310 00:13:57,468 --> 00:14:00,168 and hill you see we've got the loading screen 311 00:14:00,318 --> 00:14:01,188 or the loading text. 312 00:14:01,698 --> 00:14:04,788 And then after a while we see of the data 313 00:14:04,968 --> 00:14:05,968 okay. 314 00:14:06,258 --> 00:14:11,148 Now what's that this is the stream rendering i have to 315 00:14:11,148 --> 00:14:12,468 explain this again i dunno if you watch my earlier videos. 316 00:14:12,918 --> 00:14:17,478 So when we now go to the weather and by the way you will see me 317 00:14:17,628 --> 00:14:19,168 wandering around. 318 00:14:19,488 --> 00:14:21,142 Here in the solution explorer 319 00:14:21,258 --> 00:14:22,698 because i'm still not use it 320 00:14:23,028 --> 00:14:25,518 to look for the pages and the components 321 00:14:25,818 --> 00:14:29,598 in to two projects all right so there are pages here there are pages there at i 322 00:14:29,748 --> 00:14:30,748 still. 323 00:14:31,188 --> 00:14:32,058 Well i'm 324 00:14:32,208 --> 00:14:33,408 a and never find them 325 00:14:33,558 --> 00:14:34,218 directly 326 00:14:34,338 --> 00:14:38,388 but i hope this changes in the future but still here you what you see is the stream 327 00:14:38,388 --> 00:14:42,678 rendering so this means that we have the static service side rendering 328 00:14:42,828 --> 00:14:44,148 meaning everything is built on the 329 00:14:44,298 --> 00:14:45,508 on the server. 330 00:14:45,648 --> 00:14:46,368 We are 331 00:14:46,488 --> 00:14:48,108 can i can see the data then 332 00:14:48,378 --> 00:14:49,278 but when we. 333 00:14:49,968 --> 00:14:50,658 Would not 334 00:14:50,808 --> 00:14:54,078 half dead we can set this to fall to simply comment this out 335 00:14:54,498 --> 00:14:56,298 and restart the application 336 00:14:56,508 --> 00:14:57,436 and then you would see that. 337 00:14:57,858 --> 00:14:59,118 Takes a little while. 338 00:14:59,628 --> 00:15:01,018 To get their. 339 00:15:01,188 --> 00:15:01,728 See that. 340 00:15:02,268 --> 00:15:05,218 He and the counter and then go back to the weather page. 341 00:15:05,478 --> 00:15:07,878 And it it takes her off a second well ways that. 342 00:15:08,358 --> 00:15:13,548 They they just simulated this asynchronous call let's say so it takes 343 00:15:13,698 --> 00:15:14,718 half a second 344 00:15:14,868 --> 00:15:16,548 can set this to a second of course 345 00:15:16,998 --> 00:15:17,508 and then. 346 00:15:18,018 --> 00:15:21,588 What i want to show you is simply that without stream rendering. 347 00:15:21,978 --> 00:15:24,468 This means that we really have to wait 348 00:15:24,708 --> 00:15:26,776 for this page to load the 349 00:15:26,898 --> 00:15:31,908 before or the data to load before we can actually go there and see the data 350 00:15:32,058 --> 00:15:35,838 but you know you see that the data's already here right and with stream rendering. 351 00:15:36,138 --> 00:15:36,978 We can 352 00:15:37,248 --> 00:15:37,908 well 353 00:15:38,178 --> 00:15:41,358 see already let's see the skeleton the shell whatever you name it. 354 00:15:42,198 --> 00:15:42,890 And 355 00:15:43,098 --> 00:15:48,708 until the forecasts are loaded in this example well we 356 00:15:48,738 --> 00:15:50,698 we just see this loading text and it comes later nice. 357 00:15:50,958 --> 00:15:53,142 Actually for the use experience. 358 00:15:53,658 --> 00:15:56,898 And still no interactivity right so still no 359 00:15:57,168 --> 00:16:01,998 server side rendering static it's static they 360 00:16:01,998 --> 00:16:02,538 called it static so as had rendering but no 361 00:16:02,658 --> 00:16:04,878 web sockets so not really 362 00:16:04,998 --> 00:16:07,008 blazer server as you're used to it 363 00:16:07,278 --> 00:16:08,278 and. 364 00:16:08,478 --> 00:16:10,068 Absolutely no webassembly stuff 365 00:16:10,188 --> 00:16:11,188 so. 366 00:16:11,298 --> 00:16:12,108 In essence 367 00:16:12,498 --> 00:16:12,768 and 368 00:16:12,888 --> 00:16:13,368 again 369 00:16:13,488 --> 00:16:15,208 already very important. 370 00:16:15,318 --> 00:16:17,518 You can built your. 371 00:16:17,778 --> 00:16:18,888 Applications 372 00:16:19,098 --> 00:16:19,788 a lots 373 00:16:19,938 --> 00:16:25,168 of your applications just using these two features static server side rendering. 374 00:16:25,308 --> 00:16:26,688 And stream rendering 375 00:16:26,988 --> 00:16:29,578 big cause if you need a form. 376 00:16:29,628 --> 00:16:31,248 There's still the option to 377 00:16:31,368 --> 00:16:32,988 use the edit form with 378 00:16:33,228 --> 00:16:34,068 two more 379 00:16:34,218 --> 00:16:35,218 parameters 380 00:16:35,478 --> 00:16:38,898 and one attribute their you say supply this 381 00:16:39,023 --> 00:16:39,327 a 382 00:16:39,577 --> 00:16:41,431 data from a form. 383 00:16:41,808 --> 00:16:46,038 For parameters here in the coat blog again if use it i hope you know what i'm saying 384 00:16:46,278 --> 00:16:47,268 and then and then you're done 385 00:16:47,478 --> 00:16:48,408 it works 386 00:16:48,558 --> 00:16:49,368 all right so. 387 00:16:49,788 --> 00:16:55,098 Actually great stuff but now comes the other kind of interactivity so let's just say. 388 00:16:55,428 --> 00:16:59,598 We want to use a button like here the counter pitch this is no form riot. 389 00:17:00,018 --> 00:17:00,528 So 390 00:17:00,648 --> 00:17:02,328 what we can do we can click here 391 00:17:02,478 --> 00:17:03,737 and we see a result 392 00:17:03,918 --> 00:17:06,208 great the counter is increased 393 00:17:06,468 --> 00:17:08,448 but when we got the condo page and you 394 00:17:08,658 --> 00:17:09,108 it here 395 00:17:09,378 --> 00:17:12,018 rena mode auto is used but we are here. 396 00:17:12,408 --> 00:17:17,238 On our client project which is the web assembly project 397 00:17:17,238 --> 00:17:19,008 this is necessary because well with the auto render mode. 398 00:17:19,308 --> 00:17:22,638 We want to use also the web assembly random out. 399 00:17:22,968 --> 00:17:24,768 Right after our first load. 400 00:17:25,248 --> 00:17:28,978 So we have to set this page then. 401 00:17:29,148 --> 00:17:31,198 In the clan project because everything. 402 00:17:31,548 --> 00:17:35,628 Where you want to use web assembly has to be created or said here. 403 00:17:36,018 --> 00:17:38,118 In the client project this 404 00:17:38,268 --> 00:17:38,748 is 405 00:17:38,868 --> 00:17:39,588 important 406 00:17:39,768 --> 00:17:41,148 that what does this thing doing 407 00:17:41,328 --> 00:17:45,168 again let's just comment this out and have a quick look 408 00:17:45,588 --> 00:17:46,158 and now 409 00:17:46,308 --> 00:17:48,558 no interactivity i concur click here. 410 00:17:48,948 --> 00:17:53,068 As much as i want but nothing will happen. 411 00:17:53,628 --> 00:17:58,338 Well it's just static services rendered right we have no interactivity here 412 00:17:58,818 --> 00:18:02,240 and now let's have a quick look again i have to. 413 00:18:02,718 --> 00:18:03,858 Clear the site data. 414 00:18:04,458 --> 00:18:06,335 And now him he could to. 415 00:18:06,468 --> 00:18:07,338 There is 416 00:18:07,548 --> 00:18:11,265 ah first disclaimer this year is visual studio and hot reload stops with is not the 417 00:18:11,268 --> 00:18:12,918 websocket connection i am talking about. 418 00:18:13,368 --> 00:18:13,467 Of 419 00:18:13,639 --> 00:18:14,118 now 420 00:18:14,298 --> 00:18:16,168 uncommon this again. 421 00:18:16,728 --> 00:18:17,928 The restart the app 422 00:18:18,048 --> 00:18:22,188 it will load and this is now the websocket connection i am talking about right. 423 00:18:22,518 --> 00:18:24,958 So here now and we go to messages. 424 00:18:25,278 --> 00:18:27,718 We should be able to see. 425 00:18:28,098 --> 00:18:29,758 Something is happening. 426 00:18:29,928 --> 00:18:33,138 And may be be also see yet we see some values here. 427 00:18:33,528 --> 00:18:34,978 Where the user. 428 00:18:35,118 --> 00:18:37,728 Has clicked so this is really the web suck connection 429 00:18:37,968 --> 00:18:39,208 but we also. 430 00:18:39,318 --> 00:18:42,258 See that wasn't files have been downloaded 431 00:18:42,678 --> 00:18:45,378 and this is what also happens when you use only 432 00:18:45,678 --> 00:18:46,678 the. 433 00:18:46,968 --> 00:18:50,418 The servant or to the interactive server render moat 434 00:18:50,568 --> 00:18:52,098 right you have the websocket connection 435 00:18:52,548 --> 00:18:55,668 and when he used interactive webassembly then you see 436 00:18:55,908 --> 00:18:56,908 that. 437 00:18:56,958 --> 00:18:59,868 These files will be downloaded and in this case 438 00:18:59,988 --> 00:19:02,328 both is here right we have the websocket connection 439 00:19:02,688 --> 00:19:06,228 and also the wasn't fights and you can see that as well here in cant and the console 440 00:19:06,438 --> 00:19:07,968 you see the websocket connection is here. 441 00:19:08,328 --> 00:19:11,208 Great stuff now is when we go to the homepage for instance. 442 00:19:11,568 --> 00:19:13,188 Then after a couple of seconds yip. 443 00:19:13,608 --> 00:19:18,228 The connection is disconnected this is nice 444 00:19:18,228 --> 00:19:18,618 are at loft that this is really really great 445 00:19:18,888 --> 00:19:21,408 so no epic saga connection here because we don't need it 446 00:19:21,558 --> 00:19:23,538 of course this different when you use. 447 00:19:23,898 --> 00:19:24,798 The global 448 00:19:24,978 --> 00:19:29,208 render model the global interactivity i'm 449 00:19:29,208 --> 00:19:29,568 against still not used to all these new terms 450 00:19:29,928 --> 00:19:33,438 but i think you get what i mean here and sorry that 451 00:19:33,438 --> 00:19:34,338 we haven't even started with all the crud operations 452 00:19:34,548 --> 00:19:35,843 but i think it's important to. 453 00:19:36,558 --> 00:19:37,038 Well 454 00:19:37,248 --> 00:19:42,282 to try to understand this before we start with crutch and if you're already bought 455 00:19:42,318 --> 00:19:44,478 check out the times coats below because then. 456 00:19:44,838 --> 00:19:45,468 Of course you can. 457 00:19:45,858 --> 00:19:47,598 Jump to the chapter you want to see. 458 00:19:48,078 --> 00:19:53,998 Okay so now we've got the websocket connection but now the question is. 459 00:19:54,078 --> 00:19:55,078 Again. 460 00:19:55,158 --> 00:19:57,118 We want to have a look here. 461 00:19:57,708 --> 00:20:00,438 And what happens knowing i go back to server 462 00:20:00,634 --> 00:20:01,038 server. 463 00:20:01,513 --> 00:20:01,695 An 464 00:20:01,848 --> 00:20:06,438 alternate whether just to counter we don't see here that a websocket connection 465 00:20:06,738 --> 00:20:08,658 has been established riot same 466 00:20:08,868 --> 00:20:13,548 for the console there is no new websocket connection again we go here and back. 467 00:20:14,208 --> 00:20:17,568 Nothing happens and even when re reload the page now. 468 00:20:18,048 --> 00:20:19,727 We see only 469 00:20:19,878 --> 00:20:22,938 websocket all right so this means not this is happening. 470 00:20:23,388 --> 00:20:24,588 On the client with the help 471 00:20:24,798 --> 00:20:25,818 of webassembly 472 00:20:25,998 --> 00:20:26,998 okay. 473 00:20:27,078 --> 00:20:29,868 So far so good these other animals 474 00:20:29,988 --> 00:20:33,198 you can set them globally you can set them per page or component 475 00:20:33,348 --> 00:20:35,718 and now let's try to create our crutch 476 00:20:35,868 --> 00:20:37,768 application or kratz 477 00:20:37,878 --> 00:20:39,208 operate Patience. 478 00:20:39,348 --> 00:20:39,918 Again 479 00:20:40,158 --> 00:20:40,668 you name it. 480 00:20:41,238 --> 00:20:43,978 So what am i do is a really simple. 481 00:20:44,298 --> 00:20:45,054 Really really 482 00:20:45,168 --> 00:20:51,198 simple example for that lemme just create one folder 483 00:20:51,198 --> 00:20:52,698 for our entities and this will be simply one entity 484 00:20:52,908 --> 00:20:54,598 entity it is. 485 00:20:55,098 --> 00:20:56,778 And here i add one item 486 00:20:56,958 --> 00:20:58,518 and there should be a video game bribery three 487 00:20:58,638 --> 00:21:01,158 so it's a bit more fun for me but in essence 488 00:21:01,278 --> 00:21:02,958 at least for me maybe for you to. 489 00:21:03,498 --> 00:21:08,658 And i just use an integer for the i d that was 490 00:21:08,808 --> 00:21:09,408 hitting tip 491 00:21:09,558 --> 00:21:11,208 one time too often 492 00:21:11,598 --> 00:21:16,248 and also the name this is grade and it said this required so here now 493 00:21:16,450 --> 00:21:17,388 this is a entity 494 00:21:17,628 --> 00:21:18,048 alright 495 00:21:18,198 --> 00:21:19,818 to key keep this really really simple 496 00:21:20,080 --> 00:21:23,568 and want to use also entity framework here with sql server 497 00:21:23,718 --> 00:21:25,188 and oh i said simple but 498 00:21:25,428 --> 00:21:26,148 maybe this is a. 499 00:21:26,838 --> 00:21:29,778 Tiny bit more realistic than when we have a real database. 500 00:21:30,138 --> 00:21:36,138 Behind that application so let's let's at the boiler plate coat for that as well. 501 00:21:36,528 --> 00:21:38,148 We've got our data for the here 502 00:21:38,388 --> 00:21:40,937 and we add also i want and data 503 00:21:41,088 --> 00:21:43,458 context inherits from dp 504 00:21:43,625 --> 00:21:45,468 context and of course 505 00:21:45,648 --> 00:21:48,723 with control period we get the quick fix menu. 506 00:21:48,918 --> 00:21:52,128 And we install the latest version 507 00:21:52,278 --> 00:21:54,618 now for that we need a constructor 508 00:21:54,738 --> 00:21:58,308 the data context constructed with the db context. 509 00:21:59,058 --> 00:22:00,168 Options. 510 00:22:01,008 --> 00:22:04,258 With our data context call this options. 511 00:22:04,728 --> 00:22:08,127 And here we use the base constructor. 512 00:22:08,568 --> 00:22:11,178 As well and we only need one 513 00:22:11,418 --> 00:22:12,228 dataset 514 00:22:12,348 --> 00:22:13,668 so db set 515 00:22:13,878 --> 00:22:14,598 of type 516 00:22:14,718 --> 00:22:15,438 game 517 00:22:15,588 --> 00:22:17,058 and we simply call this 518 00:22:17,208 --> 00:22:18,208 game's. 519 00:22:18,768 --> 00:22:19,308 All right right so. 520 00:22:19,788 --> 00:22:21,318 S then will be. 521 00:22:21,918 --> 00:22:24,978 Arbiter gains oh against table will that be. 522 00:22:25,398 --> 00:22:29,598 For that we also need a connection string of course surreal that's at this 523 00:22:29,718 --> 00:22:32,158 call this by default default. 524 00:22:32,628 --> 00:22:33,378 Connection 525 00:22:33,588 --> 00:22:35,808 and in my case i'm using secrets of express 526 00:22:35,988 --> 00:22:39,408 if you don't have it installed please just Google for sql server exp press 527 00:22:39,708 --> 00:22:41,998 maybe also for the sql server. 528 00:22:42,228 --> 00:22:45,348 Management studio install all that and you're good to go. 529 00:22:45,798 --> 00:22:48,678 So he knows this shall be server 530 00:22:48,798 --> 00:22:49,798 sql. 531 00:22:50,208 --> 00:22:53,178 Eggs press database name 532 00:22:53,358 --> 00:22:56,205 is my video game in d b 533 00:22:56,358 --> 00:22:59,928 we say trust it's an escort can action 534 00:23:00,140 --> 00:23:01,678 is true. 535 00:23:02,238 --> 00:23:04,008 And trust server 536 00:23:04,128 --> 00:23:06,468 certificate is also 537 00:23:06,678 --> 00:23:07,398 true 538 00:23:07,578 --> 00:23:10,368 hope there is no typo and this should be 539 00:23:10,518 --> 00:23:11,057 our 540 00:23:11,178 --> 00:23:13,128 default connection now here 541 00:23:13,308 --> 00:23:14,548 we set. 542 00:23:14,868 --> 00:23:16,048 Or register. 543 00:23:16,385 --> 00:23:17,358 Db context 544 00:23:17,478 --> 00:23:18,918 so we say builder 545 00:23:19,038 --> 00:23:20,148 services 546 00:23:20,268 --> 00:23:21,408 and d be 547 00:23:21,603 --> 00:23:22,698 contact texts 548 00:23:22,848 --> 00:23:25,588 with our data context and here. 549 00:23:25,758 --> 00:23:26,928 We want to say 550 00:23:27,168 --> 00:23:28,308 or here we say 551 00:23:28,428 --> 00:23:30,768 that we want to use sql server 552 00:23:30,979 --> 00:23:33,059 alright so here now. 553 00:23:33,168 --> 00:23:36,058 Options use sql server. 554 00:23:36,228 --> 00:23:38,058 Need a package for that as well. 555 00:23:38,508 --> 00:23:41,208 Well let's install this manually than in a sec 556 00:23:41,598 --> 00:23:41,959 but he and 557 00:23:42,078 --> 00:23:43,738 we say for configuration. 558 00:23:44,148 --> 00:23:45,318 Configuration. 559 00:23:45,828 --> 00:23:47,518 Get connection string. 560 00:23:47,778 --> 00:23:48,558 The fault 561 00:23:48,708 --> 00:23:49,518 connection 562 00:23:49,638 --> 00:23:50,628 we at. 563 00:23:51,138 --> 00:23:53,478 To parentheses and and 564 00:23:53,598 --> 00:23:55,698 then this is the only thing that's left 565 00:23:55,878 --> 00:24:00,178 or right now we need in you get packages and since i'm using. 566 00:24:00,468 --> 00:24:04,498 The rc to here i was a bit confused because i haven't seen. 567 00:24:04,668 --> 00:24:05,668 That 568 00:24:05,808 --> 00:24:10,068 here the official release has been installed from entry from a core. 569 00:24:10,428 --> 00:24:12,258 So what i have to do just in my case 570 00:24:12,618 --> 00:24:14,868 and if you want to use priorities as well 571 00:24:15,168 --> 00:24:18,138 or not for the solution right click the so a project. 572 00:24:18,588 --> 00:24:20,188 Manager get packages. 573 00:24:20,508 --> 00:24:21,438 And here now 574 00:24:21,708 --> 00:24:25,048 check that include pre-release and first lemme. 575 00:24:25,458 --> 00:24:29,238 Have a look here as from a core we have to update this actually 576 00:24:29,418 --> 00:24:31,689 to then the. 577 00:24:31,758 --> 00:24:36,088 Rc to version because of the when we are able to also install. 578 00:24:36,168 --> 00:24:38,028 The other version or the other packages 579 00:24:38,178 --> 00:24:39,588 rather so huh now 580 00:24:39,858 --> 00:24:43,678 exactly first thing Microsoft and from a course sql server. 581 00:24:44,028 --> 00:24:48,558 Let me make this a bigger this is the wonders of the 582 00:24:48,558 --> 00:24:49,338 provide out for sql server if you want to use that. 583 00:24:49,848 --> 00:24:51,868 So let's just install this thing. 584 00:24:51,948 --> 00:24:57,288 We have it here and also oh for the chorus migrations that i want to use here. 585 00:24:57,618 --> 00:24:59,638 Minute the design package. 586 00:24:59,989 --> 00:25:01,498 Except that. 587 00:25:01,608 --> 00:25:02,328 All rights 588 00:25:02,478 --> 00:25:03,678 and now 589 00:25:03,828 --> 00:25:04,878 we have them here 590 00:25:05,178 --> 00:25:06,018 isn't that nice. 591 00:25:06,378 --> 00:25:08,298 Okay so again boilerplate stuff 592 00:25:08,658 --> 00:25:10,068 and now he should be able 593 00:25:10,518 --> 00:25:11,508 to at this 594 00:25:11,658 --> 00:25:13,878 using director feared yet this reference 595 00:25:14,028 --> 00:25:18,858 all right now the next thing we need we have our 596 00:25:18,858 --> 00:25:19,878 packages here we can debate shake here in the 597 00:25:19,998 --> 00:25:22,368 server project file ride. 598 00:25:22,998 --> 00:25:27,648 Is the next thing is that dot net e f a tools. 599 00:25:27,978 --> 00:25:31,698 So here now we can enter dot net. 600 00:25:32,148 --> 00:25:35,431 Tool install their day ash global. 601 00:25:36,077 --> 00:25:39,408 And again this is just for entity framework and 602 00:25:39,408 --> 00:25:40,158 the court forced migration stuff and when i. 603 00:25:40,548 --> 00:25:41,238 Enter this. 604 00:25:41,628 --> 00:25:46,428 I see that it's already installed know in my case i can just check with dot net 605 00:25:46,728 --> 00:25:48,918 e f and we see that I've got the. 606 00:25:49,308 --> 00:25:53,628 I r c to a version of that at eight installed 607 00:25:53,628 --> 00:25:54,628 in your case again this might be different. 608 00:25:54,858 --> 00:25:56,778 So if you want to install it. 609 00:25:57,588 --> 00:25:59,958 And you'll also want to use the rc to. 610 00:26:00,258 --> 00:26:03,748 Then use set this to dash dash of version. 611 00:26:03,859 --> 00:26:04,878 Then copy this. 612 00:26:05,208 --> 00:26:07,218 At this year again i get this error 613 00:26:07,368 --> 00:26:09,460 but what i can do is of course i can say. 614 00:26:09,918 --> 00:26:10,668 Lemme just 615 00:26:10,788 --> 00:26:12,719 an install this. 616 00:26:13,008 --> 00:26:15,318 And install this thing 617 00:26:15,448 --> 00:26:17,118 back i hope 618 00:26:17,238 --> 00:26:18,958 not is already installed. 619 00:26:19,308 --> 00:26:20,418 Okay wait a sec 620 00:26:20,568 --> 00:26:24,298 and him he tried one more time or there was a typo i guess uninstall. 621 00:26:24,798 --> 00:26:26,518 Yeah now it's installed. 622 00:26:26,838 --> 00:26:28,428 At uninstalled and now 623 00:26:28,608 --> 00:26:29,418 installed 624 00:26:29,568 --> 00:26:31,318 sorry of it's a bit confusing. 625 00:26:31,788 --> 00:26:33,888 We have today children at home one 626 00:26:34,038 --> 00:26:34,608 of them 627 00:26:34,728 --> 00:26:38,478 as a two month young baby so my nights are well 628 00:26:38,598 --> 00:26:39,798 different may be. 629 00:26:40,548 --> 00:26:47,388 Okay this is boiler plate staff now migrations we only want to have this game entity. 630 00:26:47,718 --> 00:26:51,228 In our database for that we can use code first migrations 631 00:26:51,348 --> 00:26:52,818 and this is 632 00:26:52,968 --> 00:26:55,488 interesting in this little exe sample hear. 633 00:26:55,818 --> 00:27:01,818 What i what we'll do now this is swell this is simple we just run the migrations we 634 00:27:01,818 --> 00:27:05,958 find data context here in this project right in the server project. 635 00:27:06,348 --> 00:27:10,668 We see the data conduct is registered here the 636 00:27:10,668 --> 00:27:11,268 database constant contact's we have the entered here 637 00:27:11,538 --> 00:27:12,498 everything's great 638 00:27:12,618 --> 00:27:17,338 we will see that a migrations folder will be created here in the sewer project. 639 00:27:17,418 --> 00:27:18,658 But later. 640 00:27:19,248 --> 00:27:20,478 When you and maybe you 641 00:27:20,688 --> 00:27:21,318 already 642 00:27:21,498 --> 00:27:23,118 had this question in your mind. 643 00:27:23,628 --> 00:27:28,248 If you also want to use the client here with this entity 644 00:27:28,458 --> 00:27:31,488 and services that we will create their. 645 00:27:31,998 --> 00:27:36,348 Then we have to change this a little bit 646 00:27:36,348 --> 00:27:37,348 because what if you want to add another entity. 647 00:27:37,518 --> 00:27:38,878 Run the migration. 648 00:27:39,228 --> 00:27:41,628 But the entity than is and in another projects 649 00:27:41,780 --> 00:27:41,988 be 650 00:27:42,228 --> 00:27:42,828 well 651 00:27:43,068 --> 00:27:46,848 it is getting confusing but again once you get the hang of it 652 00:27:47,148 --> 00:27:48,618 lives getting easier again 653 00:27:48,918 --> 00:27:50,398 i guess so. 654 00:27:50,688 --> 00:27:56,488 Where are we here so now we have to go to the blazer crud dot net eight folder 655 00:27:56,598 --> 00:27:58,068 and i think that is still not enough. 656 00:27:58,488 --> 00:28:04,188 We have to be here correct so this is the project with our war entity of the data 657 00:28:04,488 --> 00:28:06,348 for the and so on where everything's registered 658 00:28:06,558 --> 00:28:10,278 so now here we can say dot net e f migrations. 659 00:28:10,938 --> 00:28:11,568 At 660 00:28:11,748 --> 00:28:12,288 a. 661 00:28:12,678 --> 00:28:13,816 Should be initial. 662 00:28:14,148 --> 00:28:16,908 I think this also works anyways so 663 00:28:17,087 --> 00:28:20,718 build a started and after a couple of seconds i hope 664 00:28:20,868 --> 00:28:23,058 our built fails science of look 665 00:28:23,238 --> 00:28:23,448 of 666 00:28:23,658 --> 00:28:24,438 the fuck 667 00:28:24,618 --> 00:28:25,038 okay. 668 00:28:25,428 --> 00:28:27,108 Let's just try that one more time. 669 00:28:27,468 --> 00:28:28,488 Nor can say he. 670 00:28:29,180 --> 00:28:29,927 Alicia 671 00:28:30,108 --> 00:28:33,557 okay maybe he should close the project first or 672 00:28:33,840 --> 00:28:37,458 stop the projects rather so now for the third time 673 00:28:37,608 --> 00:28:38,598 boots succeeded 674 00:28:38,748 --> 00:28:40,228 i hope this little. 675 00:28:40,338 --> 00:28:43,108 Arrows help you in your developing process. 676 00:28:43,608 --> 00:28:47,998 Now here we've got to a migrations folder all right so here it is and we see. 677 00:28:48,108 --> 00:28:50,568 I think you know this already if knots i'm happy 678 00:28:50,958 --> 00:28:54,048 to help but if you know that of course feel free to skip. 679 00:28:54,498 --> 00:28:57,058 This part of the video. 680 00:28:57,558 --> 00:29:03,212 We create a table or called games and only with an ID and a name 681 00:29:03,378 --> 00:29:04,128 and in 682 00:29:04,428 --> 00:29:08,298 the down method that will be the rollback case of this migration we would just drop 683 00:29:08,303 --> 00:29:10,638 this table so now we can st dot net 684 00:29:10,819 --> 00:29:11,418 he f 685 00:29:11,536 --> 00:29:17,838 data base update yes it's update the command even if the database does not exist yet 686 00:29:17,988 --> 00:29:18,948 we want to 687 00:29:19,158 --> 00:29:21,648 use of the update command and as can see here now 688 00:29:21,798 --> 00:29:26,028 we see that the database and the table will be created i already opened the 689 00:29:26,058 --> 00:29:27,438 management studio and let me just 690 00:29:27,589 --> 00:29:31,368 refresh every thing ignore the other databases please this. 691 00:29:31,968 --> 00:29:35,508 Stuff from the done and rep academy and so on but this is now 692 00:29:35,628 --> 00:29:36,618 the video game 693 00:29:36,888 --> 00:29:41,124 db with our beautiful games table. 694 00:29:41,388 --> 00:29:47,478 And here we can see that there is not allowed to see yet ID and name great so again 695 00:29:47,508 --> 00:29:51,378 boilerplate stuff we are i think already forty minutes in something like that. 696 00:29:51,921 --> 00:29:53,058 I haven't even 697 00:29:53,208 --> 00:29:54,318 wrote our first 698 00:29:54,498 --> 00:29:56,894 across to commands okay so here 699 00:29:57,149 --> 00:29:58,248 are the operation rather. 700 00:29:58,788 --> 00:30:04,828 What i now want to do i want to create a service that will use. 701 00:30:05,118 --> 00:30:09,048 Of the a db context data contexts and then the first thing 702 00:30:09,228 --> 00:30:10,038 would be to. 703 00:30:10,518 --> 00:30:12,978 Gets the game stride just read them 704 00:30:13,248 --> 00:30:15,138 for that i create another folder 705 00:30:15,348 --> 00:30:16,158 and as say 706 00:30:16,278 --> 00:30:17,278 services. 707 00:30:17,718 --> 00:30:19,788 Let's create an interface first were that. 708 00:30:20,448 --> 00:30:21,168 So he now 709 00:30:21,318 --> 00:30:25,248 this is our i game service interface and here. 710 00:30:25,728 --> 00:30:29,188 Also a new item which is what game service. 711 00:30:29,499 --> 00:30:31,728 This thing implements the i games 712 00:30:32,192 --> 00:30:34,292 and we can already registered this thing. 713 00:30:34,682 --> 00:30:36,962 So he and the programs yes we say builder. 714 00:30:37,292 --> 00:30:38,972 Services at scoped 715 00:30:39,100 --> 00:30:41,522 game service that's the one 716 00:30:41,732 --> 00:30:44,783 and we use the implementation class game service 717 00:30:45,212 --> 00:30:46,862 and this my friends 718 00:30:47,132 --> 00:30:49,472 will come in very very handy. 719 00:30:49,832 --> 00:30:53,882 When we also want to use some of the crowd bureau 720 00:30:53,882 --> 00:30:54,452 patients on the client but more about that. 721 00:30:55,142 --> 00:30:57,272 And a couple of minutes so here now. 722 00:30:57,662 --> 00:30:59,282 I mean i'm talking about dependency injection. 723 00:30:59,672 --> 00:31:02,252 We were write another implementation class for the 724 00:31:02,462 --> 00:31:04,065 a game servers interface. 725 00:31:04,322 --> 00:31:05,642 Spoiler alert sorry about that. 726 00:31:06,122 --> 00:31:06,692 So now 727 00:31:06,812 --> 00:31:08,912 here let's just create one method 728 00:31:09,122 --> 00:31:10,502 and this shall be 729 00:31:10,652 --> 00:31:12,222 returning task. 730 00:31:12,332 --> 00:31:13,512 Of list. 731 00:31:13,742 --> 00:31:14,342 Game 732 00:31:14,492 --> 00:31:16,952 all rights and he be called this get 733 00:31:17,102 --> 00:31:17,612 all. 734 00:31:17,942 --> 00:31:18,942 Games. 735 00:31:19,682 --> 00:31:21,992 And now here we implement that 736 00:31:22,172 --> 00:31:26,442 and we need again our data context or private read only. 737 00:31:26,822 --> 00:31:29,012 Data the context 738 00:31:29,164 --> 00:31:32,022 context i know the service is also. 739 00:31:32,342 --> 00:31:33,962 Kind of a repository then 740 00:31:34,382 --> 00:31:34,817 but it is 741 00:31:34,930 --> 00:31:35,642 repository 742 00:31:35,852 --> 00:31:36,902 and the 743 00:31:37,052 --> 00:31:38,832 so he skipped one layer. 744 00:31:38,942 --> 00:31:41,492 And you're not using a data transfer objects here 745 00:31:41,642 --> 00:31:46,112 again sorry about that bear with me here this 746 00:31:46,112 --> 00:31:47,102 shall be a quick tutorial although it already will 747 00:31:47,282 --> 00:31:47,642 take. 748 00:31:47,972 --> 00:31:49,172 Long i guess 749 00:31:49,562 --> 00:31:51,812 but it's everything's new here right so we should. 750 00:31:52,142 --> 00:31:54,060 Take the time him to learn something you. 751 00:31:54,542 --> 00:31:55,472 Also some fun 752 00:31:55,592 --> 00:31:57,812 sometimes to learn some new stuff 753 00:31:57,932 --> 00:32:01,352 okay so get all games and hear what you want to do is. 754 00:32:01,982 --> 00:32:05,192 Just excess of a context say games. 755 00:32:05,912 --> 00:32:08,352 And we just want all of them. 756 00:32:08,612 --> 00:32:10,142 And turn them into lists 757 00:32:10,292 --> 00:32:10,862 async 758 00:32:11,042 --> 00:32:12,912 alright so you know. 759 00:32:13,142 --> 00:32:14,792 Don't forget the await keyboards 760 00:32:14,942 --> 00:32:17,232 async task all rights. 761 00:32:17,312 --> 00:32:21,072 And a decent actually our game so violent games. 762 00:32:21,902 --> 00:32:23,052 As this 763 00:32:23,162 --> 00:32:25,392 and now here we return. 764 00:32:25,682 --> 00:32:26,042 Our 765 00:32:26,192 --> 00:32:27,212 almost all what 766 00:32:27,392 --> 00:32:30,612 games okay so this is now. 767 00:32:30,752 --> 00:32:31,382 The method. 768 00:32:31,755 --> 00:32:32,102 Right. 769 00:32:32,702 --> 00:32:33,902 And now we 770 00:32:34,172 --> 00:32:35,282 build a page for that 771 00:32:35,402 --> 00:32:38,582 so here and a pages we add a new raise a component 772 00:32:38,792 --> 00:32:43,152 and recall this ah let's say this is now a one game. 773 00:32:43,622 --> 00:32:45,312 Lists components. 774 00:32:45,782 --> 00:32:50,772 This is a page so now we say page games for instance. 775 00:32:51,272 --> 00:32:56,022 Ants which can norm you do is we are on the on the sava right you see this. 776 00:32:56,462 --> 00:32:59,822 Difference to web assembly again i'm coming from web assembly so he now 777 00:33:00,006 --> 00:33:02,042 you do not have to inject the http client 778 00:33:02,252 --> 00:33:03,632 we don't make a web service 779 00:33:03,782 --> 00:33:07,622 yet a web service called the essence we just use of a service directly i know if 780 00:33:07,622 --> 00:33:09,962 you're from blazer from the blazers serve a team. 781 00:33:10,502 --> 00:33:13,322 Then you're thinking what the hell is he talking about it it's. 782 00:33:13,712 --> 00:33:14,942 So simple right but 783 00:33:15,122 --> 00:33:16,082 while not for everyone 784 00:33:16,382 --> 00:33:17,402 so injects 785 00:33:17,522 --> 00:33:19,802 i game service. 786 00:33:20,582 --> 00:33:23,412 Games service and be neat. 787 00:33:23,792 --> 00:33:27,602 A using director for that and i don't like them here in my 788 00:33:27,602 --> 00:33:29,742 components so let's just at them here in the inputs file. 789 00:33:30,122 --> 00:33:31,082 And now 790 00:33:31,202 --> 00:33:32,891 yep that is. 791 00:33:33,092 --> 00:33:36,343 We have games so huh now we have a list. 792 00:33:36,662 --> 00:33:38,042 Of a game 793 00:33:38,192 --> 00:33:39,192 again. 794 00:33:39,632 --> 00:33:42,902 This is something else we can use our imports and 795 00:33:43,056 --> 00:33:43,682 it is 796 00:33:43,832 --> 00:33:45,432 and you now. 797 00:33:45,632 --> 00:33:47,522 These are all one games 798 00:33:47,642 --> 00:33:48,782 new list 799 00:33:48,962 --> 00:33:49,562 of 800 00:33:49,712 --> 00:33:51,122 game okay 801 00:33:51,452 --> 00:33:55,092 and now on initialisation of this component. 802 00:33:55,352 --> 00:33:57,072 I wanna. 803 00:33:57,662 --> 00:34:00,722 Get them all so huh now projects it 804 00:34:00,872 --> 00:34:01,872 overrides 805 00:34:02,012 --> 00:34:03,882 on initialized async. 806 00:34:04,442 --> 00:34:05,922 We just say. 807 00:34:06,182 --> 00:34:07,142 Our games 808 00:34:07,266 --> 00:34:08,462 is now 809 00:34:08,642 --> 00:34:09,392 awaits 810 00:34:09,542 --> 00:34:10,292 okay that's new 811 00:34:10,442 --> 00:34:14,142 to the trusted is jumping here of and i just write await. 812 00:34:14,192 --> 00:34:16,442 It adds the ace and keyboard but it is jumping 813 00:34:16,592 --> 00:34:18,062 to the return type 814 00:34:18,272 --> 00:34:19,272 alright. 815 00:34:19,472 --> 00:34:21,962 Awaits game service 816 00:34:22,142 --> 00:34:23,682 get all games. 817 00:34:23,822 --> 00:34:24,662 Is ned nice 818 00:34:24,873 --> 00:34:27,812 not getting interesting so here now i say if 819 00:34:27,992 --> 00:34:28,892 let's say 820 00:34:29,105 --> 00:34:30,452 let me let me think about that 821 00:34:30,632 --> 00:34:32,082 if the. 822 00:34:32,282 --> 00:34:33,302 Games 823 00:34:33,452 --> 00:34:36,312 are a bit differently so what can do is also. 824 00:34:36,482 --> 00:34:39,163 Which is say this is now by default. 825 00:34:39,542 --> 00:34:41,372 If games is 826 00:34:41,492 --> 00:34:42,212 now 827 00:34:42,332 --> 00:34:43,172 because there's. 828 00:34:43,472 --> 00:34:44,552 An issue i want to show you 829 00:34:44,733 --> 00:34:45,632 games are now 830 00:34:45,872 --> 00:34:46,652 so now 831 00:34:46,772 --> 00:34:47,492 we just. 832 00:34:47,792 --> 00:34:50,472 Show again a loading texts. 833 00:34:50,672 --> 00:34:51,672 Alright. 834 00:34:51,752 --> 00:34:52,502 Else if 835 00:34:52,622 --> 00:34:54,702 games counts 836 00:34:54,842 --> 00:34:56,142 is zero. 837 00:34:56,912 --> 00:34:58,352 And that case we say 838 00:34:58,502 --> 00:34:59,582 no games found 839 00:34:59,732 --> 00:35:00,732 alright. 840 00:35:00,812 --> 00:35:02,352 And in the other case. 841 00:35:02,462 --> 00:35:03,302 We just say 842 00:35:03,482 --> 00:35:03,902 we. 843 00:35:04,232 --> 00:35:07,122 Add an unordered lists and for. 844 00:35:07,412 --> 00:35:08,412 Each. 845 00:35:08,942 --> 00:35:09,632 Game 846 00:35:09,842 --> 00:35:12,702 in our games list now. 847 00:35:12,902 --> 00:35:13,922 We just 848 00:35:14,072 --> 00:35:15,882 that span in this case. 849 00:35:16,264 --> 00:35:17,132 This item. 850 00:35:17,522 --> 00:35:19,022 With the game 851 00:35:19,142 --> 00:35:19,532 name 852 00:35:19,742 --> 00:35:20,252 all right 853 00:35:20,492 --> 00:35:20,912 again 854 00:35:21,030 --> 00:35:22,992 i hope simple stuff. 855 00:35:23,282 --> 00:35:24,182 Looks great right 856 00:35:24,332 --> 00:35:26,342 so let's have a look wait one more thing. 857 00:35:26,732 --> 00:35:29,447 We need the a bit of needed but let's 858 00:35:29,552 --> 00:35:30,272 look at the 859 00:35:30,452 --> 00:35:32,942 neff menu know in the components layout folder. 860 00:35:33,482 --> 00:35:35,521 And here we add another 861 00:35:35,672 --> 00:35:37,572 menu entry for. 862 00:35:38,072 --> 00:35:40,712 On was sick a terrific as then games 863 00:35:40,862 --> 00:35:42,896 game James unfortunately the. 864 00:35:43,171 --> 00:35:44,162 Or i'm i'm. 865 00:35:44,522 --> 00:35:46,272 Not really sure how they. 866 00:35:46,502 --> 00:35:47,165 Added the 867 00:35:47,342 --> 00:35:49,262 bootstrap i can see her because when i run this 868 00:35:49,472 --> 00:35:50,582 i don't see the i can there 869 00:35:50,702 --> 00:35:53,492 but we can add an svg hewlett we do the real quick 870 00:35:53,612 --> 00:35:55,423 see that we can go to icons. 871 00:35:56,072 --> 00:35:58,862 The for instance we can search for a controller. 872 00:35:59,612 --> 00:36:02,912 Deep it also looks nice and years the as bee gees one images copy that. 873 00:36:03,572 --> 00:36:06,182 Back to the studio and you know 874 00:36:06,332 --> 00:36:07,262 me just 875 00:36:07,412 --> 00:36:08,972 paste this year save it 876 00:36:09,152 --> 00:36:09,992 restored the up. 877 00:36:10,592 --> 00:36:11,342 There it is 878 00:36:11,522 --> 00:36:12,842 and we have our beautiful i can hear 879 00:36:12,992 --> 00:36:13,442 okay 880 00:36:13,592 --> 00:36:14,792 let's just go there. 881 00:36:15,482 --> 00:36:15,782 And 882 00:36:15,962 --> 00:36:16,232 it 883 00:36:16,373 --> 00:36:17,522 it it it takes. 884 00:36:18,062 --> 00:36:19,772 You don't really see this right it 885 00:36:19,952 --> 00:36:23,462 takes a while but let me show you what's going on here. 886 00:36:23,882 --> 00:36:27,282 So we go now again to our service 887 00:36:27,392 --> 00:36:28,734 and similar to the 888 00:36:29,191 --> 00:36:32,462 to the weather example here we can actually just copy that 889 00:36:32,642 --> 00:36:33,722 all rights and 890 00:36:33,902 --> 00:36:34,922 put this here 891 00:36:35,042 --> 00:36:37,052 that's just simulate a delay 892 00:36:37,292 --> 00:36:41,012 so many games it takes one second to load them 893 00:36:41,162 --> 00:36:41,882 so now now 894 00:36:42,002 --> 00:36:43,472 let's open the console again 895 00:36:43,652 --> 00:36:47,612 and let's just see what's happening here whether swan thing all right 896 00:36:47,762 --> 00:36:49,232 and now let's go to get i am clicking 897 00:36:49,442 --> 00:36:50,442 now. 898 00:36:51,182 --> 00:36:54,132 Takes a second before we get there. 899 00:36:54,362 --> 00:36:56,052 This sucks right. 900 00:36:56,192 --> 00:36:57,542 Okay bear with me here. 901 00:36:57,902 --> 00:36:59,492 This aesthetic service side rendering 902 00:36:59,642 --> 00:37:03,122 we have the exact same scenario here 903 00:37:03,362 --> 00:37:09,632 so we can now activate stream rendering for our game lists i'm really not 904 00:37:09,752 --> 00:37:10,562 used to still. 905 00:37:11,012 --> 00:37:13,335 Game same list there is. 906 00:37:13,622 --> 00:37:19,652 And now activate stream rendering see that we see the loading text that's nice right. 907 00:37:20,342 --> 00:37:22,092 This is different now. 908 00:37:22,148 --> 00:37:22,472 Right 909 00:37:22,652 --> 00:37:24,752 is the weather is the counter but games. 910 00:37:25,172 --> 00:37:27,382 We come to the pitch directly we see the loading text and 911 00:37:27,512 --> 00:37:30,752 know games found not it's at a game in the database for instance. 912 00:37:31,082 --> 00:37:31,802 Playing that. 913 00:37:32,342 --> 00:37:33,702 Now so. 914 00:37:33,902 --> 00:37:34,902 Alright. 915 00:37:35,012 --> 00:37:36,272 And now 916 00:37:36,392 --> 00:37:37,802 contact games loading. 917 00:37:38,252 --> 00:37:39,572 Cyberpunk twenty seventy seven 918 00:37:39,692 --> 00:37:40,202 isn't it nice 919 00:37:40,472 --> 00:37:41,372 so again 920 00:37:41,492 --> 00:37:43,712 static server side rendering 921 00:37:43,952 --> 00:37:46,692 with stream rendering activated. 922 00:37:47,162 --> 00:37:48,762 Still no. 923 00:37:48,872 --> 00:37:51,992 Blazer server or web assembly interactivity. 924 00:37:52,322 --> 00:37:52,802 Okay 925 00:37:52,952 --> 00:37:53,912 but this is coming 926 00:37:54,122 --> 00:37:55,502 next now now 927 00:37:55,802 --> 00:37:57,542 we want to adds 928 00:37:57,842 --> 00:37:58,802 a button 929 00:37:58,952 --> 00:38:01,562 that navigates as to another page 930 00:38:01,712 --> 00:38:06,632 and to be able to click that button we need 931 00:38:06,632 --> 00:38:07,632 interactivity and this is getting interesting. 932 00:38:07,922 --> 00:38:09,242 So the first thing. 933 00:38:09,719 --> 00:38:10,982 Let's just that 934 00:38:11,132 --> 00:38:14,282 at about button to creates a or to navigate to a page that 935 00:38:14,402 --> 00:38:16,562 enables us to key creates a new game 936 00:38:16,742 --> 00:38:17,742 alright. 937 00:38:17,852 --> 00:38:18,812 So again 938 00:38:18,932 --> 00:38:20,012 we add a new page 939 00:38:20,136 --> 00:38:24,942 raise a components and let's just call this edit because we will also use that. 940 00:38:25,172 --> 00:38:26,972 To edit or update the game 941 00:38:27,182 --> 00:38:28,922 and now here we said 942 00:38:29,072 --> 00:38:30,072 page. 943 00:38:30,782 --> 00:38:32,172 Edit game. 944 00:38:32,709 --> 00:38:33,212 That 945 00:38:33,632 --> 00:38:36,392 and let me add another route here 946 00:38:36,512 --> 00:38:38,582 already with a p diameter 947 00:38:38,762 --> 00:38:42,632 integer a ID and this is this important you have to set this to 948 00:38:42,872 --> 00:38:45,602 integer here because by default this will be a string 949 00:38:45,842 --> 00:38:46,832 this leads to an arrow 950 00:38:47,252 --> 00:38:51,687 and because our ideas of type integer so you 951 00:38:51,722 --> 00:38:52,262 have specified this constrained the idea will be 952 00:38:52,532 --> 00:38:53,162 an integer. 953 00:38:53,492 --> 00:38:55,322 Added game does not exist in the 954 00:38:55,502 --> 00:38:58,052 in individual city you own like that so maybe. 955 00:38:58,352 --> 00:38:59,732 Now he 956 00:38:59,912 --> 00:39:01,712 she it it is more happy now. 957 00:39:02,072 --> 00:39:02,491 Okay 958 00:39:02,612 --> 00:39:04,292 that's nice but let's let's just 959 00:39:04,412 --> 00:39:06,852 implement the create case so. 960 00:39:06,932 --> 00:39:12,812 Create game for that we need while the game here right so 961 00:39:12,812 --> 00:39:14,732 the game that we want to create so this one new game then 962 00:39:14,852 --> 00:39:16,212 new game. 963 00:39:16,502 --> 00:39:19,272 With the name name. 964 00:39:19,412 --> 00:39:22,174 String m t by the. 965 00:39:22,592 --> 00:39:23,832 Let's say. 966 00:39:23,942 --> 00:39:28,302 And now we can already continue with the edit forms for the edit form. 967 00:39:28,352 --> 00:39:28,920 For those who 968 00:39:29,094 --> 00:39:32,232 don't know this is the typical built in component. 969 00:39:32,372 --> 00:39:33,182 Of blazer 970 00:39:33,332 --> 00:39:35,792 that is used to well built a forum 971 00:39:35,972 --> 00:39:36,332 and 972 00:39:36,632 --> 00:39:41,042 do whatever you want with that form create stuff update stuff. 973 00:39:41,492 --> 00:39:42,632 They've even delete stuff. 974 00:39:43,142 --> 00:39:45,902 We need a model for that added form so it knows what's 975 00:39:46,082 --> 00:39:49,092 going on here and what we want to change for instance. 976 00:39:49,202 --> 00:39:51,272 And we can add also. 977 00:39:51,602 --> 00:39:55,382 As submit method also on Reddit submit if you want to add validation 978 00:39:55,562 --> 00:39:57,782 for instance you have to set a name and can 979 00:39:57,992 --> 00:40:00,752 display then and error message all that stuff that we can do. 980 00:40:01,112 --> 00:40:02,462 In other videos of course in the 981 00:40:02,612 --> 00:40:03,362 and web academy 982 00:40:03,692 --> 00:40:04,382 and so on 983 00:40:04,682 --> 00:40:08,912 but a forty now let's try to keep the simply because i have a feeling that this 984 00:40:08,912 --> 00:40:12,692 tutorial will be very very long a hemp plant this this is kinda life. 985 00:40:13,022 --> 00:40:13,442 Really. 986 00:40:13,892 --> 00:40:14,342 So 987 00:40:14,522 --> 00:40:15,842 we just add a 988 00:40:16,113 --> 00:40:18,702 label here for the name. 989 00:40:18,872 --> 00:40:25,705 And again another built in component inputs texts 990 00:40:25,705 --> 00:40:27,462 it shall be for the name we have bind the name. 991 00:40:27,722 --> 00:40:30,222 Of our game so. 992 00:40:30,632 --> 00:40:32,082 Named the game. 993 00:40:33,152 --> 00:40:35,612 It's and he reaches display it's 994 00:40:35,792 --> 00:40:38,552 and that's it for the data and then we need 995 00:40:38,722 --> 00:40:44,412 a button or answer here button type important this is the submit button. 996 00:40:44,792 --> 00:40:49,973 We can add a class like button button a primary bootstrap stuff. 997 00:40:50,042 --> 00:40:51,972 And call this submits 998 00:40:52,202 --> 00:40:56,173 and then of course your to know meet the handled submit method. 999 00:40:56,252 --> 00:40:59,382 So this will probably be. 1000 00:40:59,492 --> 00:41:02,802 Also something a synchronous so async task. 1001 00:41:02,912 --> 00:41:04,292 Handle submits 1002 00:41:04,412 --> 00:41:06,192 and now here. 1003 00:41:06,392 --> 00:41:07,142 We do something 1004 00:41:07,412 --> 00:41:07,892 alright 1005 00:41:08,042 --> 00:41:09,182 gimme a second here. 1006 00:41:09,692 --> 00:41:13,982 First we want to get to that page right so the this is 1007 00:41:14,192 --> 00:41:16,292 actually everything we need we have the. 1008 00:41:16,712 --> 00:41:17,312 We have no 1009 00:41:17,582 --> 00:41:21,752 routes file where he have to specify although a routes this is the beauty of blazer 1010 00:41:21,752 --> 00:41:24,072 or one of the many beauties of blazer. 1011 00:41:24,452 --> 00:41:26,142 For instance if you know angular. 1012 00:41:26,222 --> 00:41:27,182 You know what i'm talking about. 1013 00:41:27,572 --> 00:41:31,682 So huh now this is everything we need but again now we want 1014 00:41:31,682 --> 00:41:33,242 to navigate to that page of course we could just use and. 1015 00:41:33,666 --> 00:41:34,562 A tech 1016 00:41:34,862 --> 00:41:36,062 with the nature of and so on 1017 00:41:36,212 --> 00:41:37,382 but let's say want to use a button. 1018 00:41:37,742 --> 00:41:39,482 So be go back to our game lists. 1019 00:41:40,112 --> 00:41:40,772 And here now 1020 00:41:40,982 --> 00:41:42,062 i want to add button 1021 00:41:42,242 --> 00:41:43,382 give it the text 1022 00:41:43,592 --> 00:41:45,582 create a game. 1023 00:41:46,112 --> 00:41:50,202 And also a class so button button. 1024 00:41:50,552 --> 00:41:51,572 Primary. 1025 00:41:52,142 --> 00:41:55,292 And in here now with at all one click we can say. 1026 00:41:55,712 --> 00:41:57,212 When someone clicks this. 1027 00:41:57,662 --> 00:41:58,712 Recall a method 1028 00:41:58,832 --> 00:42:03,932 called create a game and again here we will add a method 1029 00:42:04,202 --> 00:42:06,822 to navigate the user to the other page. 1030 00:42:07,022 --> 00:42:11,504 For that we need the navigation manager so let's inject this thing real quick. 1031 00:42:11,672 --> 00:42:14,713 Manager navigation a manager 1032 00:42:14,972 --> 00:42:16,262 and now down here 1033 00:42:16,412 --> 00:42:17,252 create 1034 00:42:17,383 --> 00:42:18,212 game 1035 00:42:18,332 --> 00:42:21,752 navigation manager not the context the manager 1036 00:42:21,932 --> 00:42:22,652 manager 1037 00:42:22,832 --> 00:42:23,972 that's the one actually 1038 00:42:24,122 --> 00:42:24,872 yet there it is 1039 00:42:25,352 --> 00:42:28,542 and here we say edits dash. 1040 00:42:28,832 --> 00:42:29,642 Game 1041 00:42:29,822 --> 00:42:30,782 let's test that 1042 00:42:30,992 --> 00:42:31,992 so. 1043 00:42:32,539 --> 00:42:33,722 So many tabs open oh. 1044 00:42:34,262 --> 00:42:36,312 Okay it is rebuilding. 1045 00:42:36,813 --> 00:42:38,372 Me see loading twenty seven 1046 00:42:38,614 --> 00:42:39,842 so fuck twenty seventy seven 1047 00:42:40,022 --> 00:42:40,862 create the game 1048 00:42:41,042 --> 00:42:44,172 on oh we forgot something we need interactivity 1049 00:42:44,282 --> 00:42:48,102 well of course let's just add attribute 1050 00:42:48,272 --> 00:42:49,232 and then. 1051 00:42:49,622 --> 00:42:50,401 Render 1052 00:42:50,552 --> 00:42:52,292 mode interact active 1053 00:42:52,472 --> 00:42:53,472 server. 1054 00:42:53,762 --> 00:42:54,572 Right 1055 00:42:54,692 --> 00:42:55,692 restart. 1056 00:42:58,202 --> 00:42:58,742 With that. 1057 00:42:59,274 --> 00:42:59,367 The 1058 00:42:59,558 --> 00:43:00,558 twice. 1059 00:43:01,352 --> 00:43:02,772 What the heck. 1060 00:43:03,452 --> 00:43:04,452 Okay. 1061 00:43:04,892 --> 00:43:06,642 To hear back. 1062 00:43:07,502 --> 00:43:08,462 Loading twice. 1063 00:43:08,822 --> 00:43:10,155 Why's that. 1064 00:43:10,442 --> 00:43:10,862 And he go to 1065 00:43:11,012 --> 00:43:11,462 cricket 1066 00:43:11,732 --> 00:43:15,072 okay this is something as i forgot but this is not important for now. 1067 00:43:15,398 --> 00:43:16,800 Important thing i wanted to show you. 1068 00:43:17,133 --> 00:43:20,262 Is that it loads twice so this is. 1069 00:43:20,522 --> 00:43:21,242 Already 1070 00:43:21,392 --> 00:43:22,442 one thing 1071 00:43:22,652 --> 00:43:24,252 to well. 1072 00:43:24,662 --> 00:43:28,292 Be careful about we edit stream rendering and also. 1073 00:43:28,622 --> 00:43:29,732 Interactive server. 1074 00:43:30,152 --> 00:43:31,152 Now. 1075 00:43:31,382 --> 00:43:35,942 Interactive surrender more does something similar 1076 00:43:36,002 --> 00:43:37,082 to stream a rendering but but just to show you again 1077 00:43:37,322 --> 00:43:37,922 what is 1078 00:43:38,102 --> 00:43:39,302 happening here and want to. 1079 00:43:39,932 --> 00:43:41,682 Commend everything out. 1080 00:43:42,002 --> 00:43:43,842 So restart the application. 1081 00:43:44,612 --> 00:43:46,602 And huh no. 1082 00:43:47,192 --> 00:43:50,282 Again when we make the switch from the counter page to the games page. 1083 00:43:50,672 --> 00:43:55,472 We get directly to that page right a click and the pages they're loading great. 1084 00:43:55,892 --> 00:43:59,352 Now let's try it the other way. 1085 00:43:59,492 --> 00:44:02,072 Only interactive serve em out 1086 00:44:02,222 --> 00:44:05,132 all rights but now when i got from counter to games. 1087 00:44:05,552 --> 00:44:08,492 Takes awhile i already clicked and you've seen something. 1088 00:44:08,972 --> 00:44:10,182 Has already. 1089 00:44:10,382 --> 00:44:13,202 Been rendered there's somehow and maybe we can already see it 1090 00:44:13,412 --> 00:44:16,632 also seed in the console so we go to gain James. 1091 00:44:18,452 --> 00:44:18,693 While 1092 00:44:18,831 --> 00:44:19,982 literally in the console but 1093 00:44:20,282 --> 00:44:22,964 again we go to counter then games. 1094 00:44:23,912 --> 00:44:27,002 There's some flickering something is happening there 1095 00:44:27,122 --> 00:44:29,372 and i'm not sure what is happening there 1096 00:44:29,702 --> 00:44:31,802 but i can tell you that what i do now. 1097 00:44:32,312 --> 00:44:34,662 Thanks to the Twitter community really. 1098 00:44:34,712 --> 00:44:36,883 Or x community sorry. 1099 00:44:37,262 --> 00:44:42,732 Pre rendering is enabled by default all right so what you have to do. 1100 00:44:43,352 --> 00:44:44,912 If you don't want that flicker 1101 00:44:45,182 --> 00:44:47,562 and only want to use interactive server. 1102 00:44:47,822 --> 00:44:49,952 Or maybe together a stream rendering 1103 00:44:50,132 --> 00:44:52,242 then what you can do is. 1104 00:44:53,582 --> 00:44:57,072 Something like that with there'd be disable. 1105 00:44:57,332 --> 00:45:01,472 Pre rendering just for that component and you see no flicker any more. 1106 00:45:01,802 --> 00:45:06,602 We can get directly to that page it is loading so this is the stream rendering action 1107 00:45:07,022 --> 00:45:07,563 and then 1108 00:45:07,682 --> 00:45:10,232 comes the interactive service stuff. 1109 00:45:10,622 --> 00:45:15,229 What am not sure about is why we he also see 1110 00:45:15,229 --> 00:45:15,632 the out this because of the contest sorry. 1111 00:45:15,962 --> 00:45:16,922 Maybe i should to 1112 00:45:17,132 --> 00:45:19,082 choose the home page for the switch. 1113 00:45:19,472 --> 00:45:21,222 So now here we see. 1114 00:45:21,842 --> 00:45:23,592 That the. 1115 00:45:24,512 --> 00:45:27,046 It has been a load it. 1116 00:45:28,022 --> 00:45:31,952 And we have no flicker at all and we can go 1117 00:45:31,952 --> 00:45:32,402 to the great game damages fixed and very quick 1118 00:45:32,552 --> 00:45:33,183 in the 1119 00:45:33,335 --> 00:45:33,543 and 1120 00:45:33,661 --> 00:45:35,551 games 1121 00:45:35,732 --> 00:45:37,610 and game there is. 1122 00:45:37,952 --> 00:45:39,692 And here we just and a 1123 00:45:39,872 --> 00:45:40,872 quick. 1124 00:45:41,642 --> 00:45:42,242 The 1125 00:45:42,512 --> 00:45:43,512 and. 1126 00:45:44,040 --> 00:45:48,120 I Dean Smith this know as well and this is as a. 1127 00:45:48,812 --> 00:45:49,812 Parameter. 1128 00:45:50,402 --> 00:45:53,502 Form and everything and now this should work. 1129 00:45:54,992 --> 00:45:55,992 Games. 1130 00:45:57,182 --> 00:45:57,572 Create. 1131 00:45:58,202 --> 00:45:59,042 A him 1132 00:45:59,222 --> 00:46:02,172 i made another mistake oh my gosh. 1133 00:46:06,182 --> 00:46:07,872 That's what we're talking about. 1134 00:46:09,002 --> 00:46:11,772 Okay so now home games. 1135 00:46:12,212 --> 00:46:16,112 Create game no flicker we can and do anything here. 1136 00:46:16,502 --> 00:46:18,672 Connection has been disabled again. 1137 00:46:19,082 --> 00:46:24,372 We can come back here connection is here again and so on but isn't the right way. 1138 00:46:24,542 --> 00:46:26,342 Maybe we can do this 1139 00:46:26,462 --> 00:46:27,902 a bit differently 1140 00:46:28,022 --> 00:46:29,882 well maybe but. 1141 00:46:30,182 --> 00:46:33,822 Again just in case you want to dude like that may be. 1142 00:46:34,052 --> 00:46:38,832 Since we only need this button here actually that should be interactive. 1143 00:46:38,972 --> 00:46:41,292 May we can create another component 1144 00:46:41,522 --> 00:46:45,632 and just make this component interactive and this component is 1145 00:46:45,842 --> 00:46:47,042 also just 1146 00:46:47,342 --> 00:46:47,942 a button 1147 00:46:48,182 --> 00:46:49,052 and know what you're thinking. 1148 00:46:49,532 --> 00:46:50,912 Patrick really 1149 00:46:51,032 --> 00:46:55,512 just the button read just only create a button component. 1150 00:46:55,862 --> 00:46:57,482 Year sometimes it. 1151 00:46:58,142 --> 00:47:00,242 Might make sense but of course is there are 1152 00:47:00,542 --> 00:47:01,832 many more options now 1153 00:47:01,982 --> 00:47:04,262 to realize this functionality here 1154 00:47:04,412 --> 00:47:05,612 but let's just go with 1155 00:47:05,713 --> 00:47:07,022 the idea of creating. 1156 00:47:07,357 --> 00:47:08,642 This button now 1157 00:47:09,062 --> 00:47:13,062 and i'd say we add a new folder for that. 1158 00:47:13,232 --> 00:47:17,322 And call this folder may be shared because maybe we need this button. 1159 00:47:18,002 --> 00:47:23,860 At some other page as well and here now we just say this is a new razor component. 1160 00:47:24,152 --> 00:47:25,812 And recalled this thing. 1161 00:47:26,162 --> 00:47:26,911 Create 1162 00:47:27,122 --> 00:47:28,122 game. 1163 00:47:28,442 --> 00:47:30,762 Button because the thing is. 1164 00:47:30,872 --> 00:47:32,502 You cannot simply say. 1165 00:47:33,032 --> 00:47:36,962 On clique we we use a parameter for the. 1166 00:47:37,322 --> 00:47:41,262 For this but in here and say okay with the perimeter then be set. 1167 00:47:41,358 --> 00:47:44,762 A function like the navigate to function this will not work 1168 00:47:44,912 --> 00:47:46,952 because the coat then is still here 1169 00:47:47,132 --> 00:47:48,542 and we need that co it's. 1170 00:47:48,872 --> 00:47:52,712 Actually in the component that needs the 1171 00:47:52,712 --> 00:47:53,222 interactivity because when the court is here. 1172 00:47:53,582 --> 00:47:54,582 This. 1173 00:47:54,782 --> 00:47:59,612 Component in would not be interactive right 1174 00:47:59,612 --> 00:47:59,972 again we we don't want to use that he re here 1175 00:48:00,122 --> 00:48:01,832 we just want to use dream rendering 1176 00:48:01,982 --> 00:48:03,872 to display the list of our games 1177 00:48:04,172 --> 00:48:08,312 and then you want to make only this but an interactive and whatever is happening. 1178 00:48:08,822 --> 00:48:11,642 Within this component so inside that component 1179 00:48:11,882 --> 00:48:13,982 this shall be interactive but for that 1180 00:48:14,192 --> 00:48:15,392 the code has also. 1181 00:48:15,782 --> 00:48:19,232 A has altered to be inside that components so in essence. 1182 00:48:19,622 --> 00:48:21,792 He just grabbed that thing here. 1183 00:48:23,287 --> 00:48:24,287 That's. 1184 00:48:25,832 --> 00:48:28,562 And go to our create game button 1185 00:48:28,742 --> 00:48:29,912 put that here 1186 00:48:30,122 --> 00:48:31,122 also 1187 00:48:31,229 --> 00:48:34,560 at the navigation mintage of course inject navigation. 1188 00:48:35,342 --> 00:48:37,032 Manager navigation 1189 00:48:37,142 --> 00:48:38,162 manager. 1190 00:48:39,932 --> 00:48:42,822 Alright and then the game lists. 1191 00:48:43,622 --> 00:48:45,312 Grabbed this thing. 1192 00:48:46,292 --> 00:48:47,342 And. 1193 00:48:47,672 --> 00:48:48,092 Put. 1194 00:48:48,512 --> 00:48:50,142 This here. 1195 00:48:50,672 --> 00:48:51,852 All right. 1196 00:48:52,652 --> 00:48:53,652 And. 1197 00:48:53,852 --> 00:48:55,742 He said the random out so he now. 1198 00:48:56,133 --> 00:48:58,965 Again from the game this let me just scrap that. 1199 00:48:59,582 --> 00:49:00,792 Like that. 1200 00:49:02,552 --> 00:49:07,722 And let's just say stream rendering is fine let's see how this looks then. 1201 00:49:08,132 --> 00:49:10,052 And here in the game list now 1202 00:49:10,352 --> 00:49:11,502 we say. 1203 00:49:11,672 --> 00:49:13,212 This is our creates. 1204 00:49:13,862 --> 00:49:14,862 Game. 1205 00:49:14,912 --> 00:49:16,052 Button. 1206 00:49:16,682 --> 00:49:18,282 But maybe we can. 1207 00:49:18,782 --> 00:49:20,143 Rep that's. 1208 00:49:20,822 --> 00:49:23,772 Put that here so and using. 1209 00:49:24,782 --> 00:49:26,082 Like that. 1210 00:49:26,462 --> 00:49:27,182 So now 1211 00:49:27,302 --> 00:49:30,192 on the game list page we have stream rendering. 1212 00:49:31,052 --> 00:49:34,842 Navigation manager is not necessary here. 1213 00:49:35,672 --> 00:49:36,872 And now 1214 00:49:36,992 --> 00:49:37,772 we have our. 1215 00:49:38,072 --> 00:49:40,352 Create game button here we have 1216 00:49:40,532 --> 00:49:42,732 interactive serve a random out. 1217 00:49:44,948 --> 00:49:50,492 That should just navigate us to the edit game page let's see if this works 1218 00:49:50,612 --> 00:49:50,702 a 1219 00:49:50,853 --> 00:49:53,502 i think that's it let me go to the home page. 1220 00:49:53,822 --> 00:49:54,822 Reloads. 1221 00:49:55,131 --> 00:49:56,302 Could the games. 1222 00:49:57,188 --> 00:50:00,045 A k we have a websocket connection or here. 1223 00:50:00,182 --> 00:50:02,622 Create game we get here. 1224 00:50:02,822 --> 00:50:04,332 And we see. 1225 00:50:06,152 --> 00:50:10,652 We we get to the page directly and then after a couple 1226 00:50:10,652 --> 00:50:11,522 of while two seconds one second whatever it was. 1227 00:50:11,912 --> 00:50:13,022 We see the list. 1228 00:50:13,532 --> 00:50:14,402 Of the games. 1229 00:50:14,702 --> 00:50:16,052 Okay so far. 1230 00:50:16,562 --> 00:50:17,612 One way to do it 1231 00:50:17,732 --> 00:50:21,162 again there are so many ways to do that. 1232 00:50:21,782 --> 00:50:27,992 Okay now karate meaning cree age we have to 1233 00:50:27,992 --> 00:50:28,992 read for all the games and now creating a game. 1234 00:50:29,582 --> 00:50:31,542 Let's now say. 1235 00:50:32,132 --> 00:50:38,342 May be me don't want to create a game here on the server because we've already seen 1236 00:50:38,612 --> 00:50:44,972 this actually works here on our a game list page we see we can inject our game service 1237 00:50:45,272 --> 00:50:47,642 and called the get all the games method 1238 00:50:47,942 --> 00:50:48,752 but now. 1239 00:50:49,082 --> 00:50:49,712 We need enough. 1240 00:50:50,300 --> 00:50:51,077 To create 1241 00:50:51,290 --> 00:50:53,660 a game and maybe this is an opportunity 1242 00:50:53,960 --> 00:50:59,000 to use their to do that on the client so how would be do that. 1243 00:50:59,480 --> 00:51:03,980 First we have to add something to our server right at or service that's the one 1244 00:51:04,100 --> 00:51:08,540 so he now another method returning the new game and call this 1245 00:51:08,960 --> 00:51:11,180 and game because we not really Korea eating a game 1246 00:51:11,300 --> 00:51:12,410 you're adding a game. 1247 00:51:12,830 --> 00:51:14,670 All right so here. 1248 00:51:14,720 --> 00:51:17,240 Let's implement that method as well 1249 00:51:17,420 --> 00:51:19,490 and simply say 1250 00:51:19,730 --> 00:51:20,990 context. 1251 00:51:21,740 --> 00:51:22,740 Games 1252 00:51:22,850 --> 00:51:23,300 and. 1253 00:51:23,630 --> 00:51:24,630 Game. 1254 00:51:25,130 --> 00:51:26,700 And then awaits. 1255 00:51:27,726 --> 00:51:30,600 It's not jumping to the return type that was interesting. 1256 00:51:30,680 --> 00:51:34,700 And here we returned the new game because with that are me safe that. 1257 00:51:35,030 --> 00:51:39,528 This thing he gets in ID because sql server will curry or entity framework visit 1258 00:51:39,533 --> 00:51:41,090 secrets over its secrets of a right 1259 00:51:41,360 --> 00:51:45,620 yes he were surveys creating an i d automatically for i want new entity 1260 00:51:46,040 --> 00:51:47,760 and with that then. 1261 00:51:47,870 --> 00:51:50,300 We get this ID so when return that thing. 1262 00:51:50,750 --> 00:51:54,150 We have the name of the game and also the ID. 1263 00:51:54,260 --> 00:51:55,610 Beautiful stuff. 1264 00:51:56,000 --> 00:52:01,250 So we could simply do that on the server for instance here now we just say. 1265 00:52:01,730 --> 00:52:03,334 Again the injects. 1266 00:52:05,090 --> 00:52:06,717 I game service. 1267 00:52:07,460 --> 00:52:08,787 Games service. 1268 00:52:09,950 --> 00:52:10,730 And say 1269 00:52:10,850 --> 00:52:11,850 weights. 1270 00:52:13,610 --> 00:52:15,050 Game service. 1271 00:52:16,190 --> 00:52:17,460 At game. 1272 00:52:17,851 --> 00:52:18,332 Game. 1273 00:52:18,710 --> 00:52:19,160 All right 1274 00:52:19,310 --> 00:52:21,240 now the thing is again. 1275 00:52:21,470 --> 00:52:23,144 No interactivity here so 1276 00:52:23,390 --> 00:52:26,430 even when we have implemented all that. 1277 00:52:26,990 --> 00:52:28,530 We can go to games. 1278 00:52:30,102 --> 00:52:31,910 Maybe he also. 1279 00:52:32,484 --> 00:52:34,730 Got to games loading create a game 1280 00:52:35,210 --> 00:52:38,010 and on as such let's just say the. 1281 00:52:38,360 --> 00:52:43,220 Last of us submits it's telling us the pulse 1282 00:52:43,223 --> 00:52:44,223 request doesn't specify which form being submitted. 1283 00:52:44,720 --> 00:52:47,671 And sure form elements have a form name. 1284 00:52:47,780 --> 00:52:51,080 Attribute with any unique value or http loss of form name parameter of using. 1285 00:52:51,500 --> 00:52:53,720 Edit former case so this is something new right. 1286 00:52:54,050 --> 00:52:54,410 So. 1287 00:52:54,740 --> 00:52:57,300 Before we jump to web assembly. 1288 00:52:57,560 --> 00:53:02,030 Or adding interactivity here maybe we can do something else 1289 00:53:02,150 --> 00:53:03,530 so of form 1290 00:53:03,770 --> 00:53:04,370 name. 1291 00:53:04,700 --> 00:53:07,730 Let's say form name is here will 1292 00:53:07,850 --> 00:53:09,570 and it's game. 1293 00:53:10,250 --> 00:53:13,340 And then we also need this 1294 00:53:13,441 --> 00:53:16,340 thing here and we can add another attribute. 1295 00:53:16,820 --> 00:53:19,740 Supply parameter from. 1296 00:53:19,940 --> 00:53:20,940 Form. 1297 00:53:21,680 --> 00:53:24,660 Can it's safe that and try that one more time. 1298 00:53:25,460 --> 00:53:26,420 Nope not working 1299 00:53:26,570 --> 00:53:28,220 was that this has to be 1300 00:53:28,400 --> 00:53:30,350 a yeah of course this is a parameter right 1301 00:53:30,470 --> 00:53:33,530 so this also has to be a property now 1302 00:53:33,650 --> 00:53:34,640 so let's make 1303 00:53:34,880 --> 00:53:36,815 this a property real quick. 1304 00:53:38,570 --> 00:53:40,410 Gets or. 1305 00:53:40,490 --> 00:53:41,510 Sets 1306 00:53:41,677 --> 00:53:42,502 that's 1307 00:53:42,620 --> 00:53:43,610 let's try the now 1308 00:53:43,790 --> 00:53:49,290 let's start with the game list recreate a game and know the last of. 1309 00:53:49,520 --> 00:53:51,120 Us submits. 1310 00:53:52,400 --> 00:53:54,050 Something was happening. 1311 00:53:54,381 --> 00:53:55,800 Be go to games. 1312 00:53:56,210 --> 00:53:57,750 We have our game. 1313 00:53:58,040 --> 00:54:00,798 Okay not bad it's. 1314 00:54:00,890 --> 00:54:04,940 Not that so again no interactivity here on this page 1315 00:54:05,210 --> 00:54:06,050 it's still. 1316 00:54:06,470 --> 00:54:08,030 Only service and rendering 1317 00:54:08,510 --> 00:54:10,560 but we can use that form. 1318 00:54:10,790 --> 00:54:12,330 That's nice. 1319 00:54:12,620 --> 00:54:13,890 And now. 1320 00:54:14,420 --> 00:54:16,250 Actually what we can do. 1321 00:54:16,850 --> 00:54:19,070 Is we can do the same thing. 1322 00:54:19,520 --> 00:54:20,570 For 1323 00:54:20,720 --> 00:54:21,890 updating a game 1324 00:54:22,040 --> 00:54:27,050 but what about deleting for instance well deleting would be than of 1325 00:54:27,230 --> 00:54:31,880 batson in essence that we can put here or on the game list again. 1326 00:54:32,240 --> 00:54:34,800 So the this could be similar to. 1327 00:54:35,090 --> 00:54:36,090 Actually 1328 00:54:36,199 --> 00:54:40,070 the stuff we have already implemented right so here for instance in the are. 1329 00:54:40,490 --> 00:54:41,510 In the game lists 1330 00:54:41,750 --> 00:54:42,930 be can. 1331 00:54:43,040 --> 00:54:44,040 Hear. 1332 00:54:44,330 --> 00:54:45,110 That something i. 1333 00:54:45,590 --> 00:54:48,830 Wanted to implement any ways and edit button which is again. 1334 00:54:49,165 --> 00:54:51,151 A separate component and then also 1335 00:54:51,387 --> 00:54:52,340 delete button which 1336 00:54:52,490 --> 00:54:53,090 which can be. 1337 00:54:53,420 --> 00:54:56,870 A separate component in this then has the interactivity for instance. 1338 00:54:57,200 --> 00:54:58,820 Of the edit button can also be a link 1339 00:54:58,970 --> 00:55:01,160 but the delete button really has to. 1340 00:55:01,550 --> 00:55:02,780 Make let's say. 1341 00:55:03,200 --> 00:55:07,790 A call to a service then and the service then gripped the ID. 1342 00:55:08,360 --> 00:55:10,470 And deletes the game then. 1343 00:55:10,520 --> 00:55:11,330 On the database 1344 00:55:11,480 --> 00:55:11,900 well 1345 00:55:12,050 --> 00:55:18,260 again so so many options so many possibilities so how 1346 00:55:18,260 --> 00:55:19,400 should be do that now well this is an example editorial 1347 00:55:19,610 --> 00:55:21,680 so i want to show you something else. 1348 00:55:22,070 --> 00:55:24,200 Again be go to edit game 1349 00:55:24,410 --> 00:55:26,450 we see this form works 1350 00:55:26,630 --> 00:55:28,140 but now let's forget. 1351 00:55:29,480 --> 00:55:34,760 The the new form with service had rendering 1352 00:55:34,760 --> 00:55:35,780 although it is great that it works that way rights. 1353 00:55:36,110 --> 00:55:37,910 Again i have to repeat that. 1354 00:55:38,240 --> 00:55:42,230 This is Sarah side rendering with of form enabled so we. 1355 00:55:42,620 --> 00:55:46,950 Kinda have indoor activity without web sockets and with vowed webassembly. 1356 00:55:47,360 --> 00:55:48,800 Actually great stuff 1357 00:55:49,280 --> 00:55:53,720 but now let's say we want to use that on the 1358 00:55:53,750 --> 00:55:54,200 client you want to download this form and. 1359 00:55:54,590 --> 00:55:57,300 Enable the user to use that form. 1360 00:55:57,410 --> 00:56:01,610 On the client when the your users offline for instance may be. 1361 00:56:02,000 --> 00:56:02,539 We. 1362 00:56:02,960 --> 00:56:04,940 Well it's a big form that the user 1363 00:56:05,120 --> 00:56:09,920 enters lots and lots of stuff and then we want 1364 00:56:09,920 --> 00:56:10,370 to make use of the local storage jj as well 1365 00:56:10,790 --> 00:56:13,560 to store that maybe temporality 1366 00:56:13,910 --> 00:56:16,220 and to well for that we need web Sandy right 1367 00:56:16,340 --> 00:56:17,750 so how would that work 1368 00:56:17,870 --> 00:56:18,200 well. 1369 00:56:18,801 --> 00:56:19,580 Microsoft said 1370 00:56:19,880 --> 00:56:21,811 we can simply use attributes. 1371 00:56:22,460 --> 00:56:23,670 And then. 1372 00:56:23,810 --> 00:56:24,830 Random out 1373 00:56:25,010 --> 00:56:26,870 and are active. 1374 00:56:28,580 --> 00:56:29,060 Web 1375 00:56:29,183 --> 00:56:30,183 assembly. 1376 00:56:30,689 --> 00:56:31,689 Right. 1377 00:56:32,000 --> 00:56:33,000 Almost. 1378 00:56:33,200 --> 00:56:34,316 Like that. 1379 00:56:35,150 --> 00:56:36,200 Let's save that now 1380 00:56:36,500 --> 00:56:37,790 and have look 1381 00:56:37,942 --> 00:56:40,051 floating create game. 1382 00:56:41,157 --> 00:56:45,350 Okay this does not work couldn't be found in the assembly blazer crush on at date. 1383 00:56:45,793 --> 00:56:46,520 The of course 1384 00:56:46,670 --> 00:56:50,630 because maybe you paid attention at the beginning 1385 00:56:50,631 --> 00:56:51,631 and you haven't skipped the video right. 1386 00:56:51,770 --> 00:56:55,700 When we now want to use that on the client we have to move the whole component 1387 00:56:55,827 --> 00:56:56,450 component 1388 00:56:56,750 --> 00:56:58,640 or page to the client as well 1389 00:56:58,910 --> 00:57:00,500 so what we have to do it 1390 00:57:00,650 --> 00:57:01,039 reaches 1391 00:57:01,160 --> 00:57:02,491 move it's. 1392 00:57:03,140 --> 00:57:05,990 Almost here down one here 1393 00:57:06,200 --> 00:57:07,730 now we've got edit game 1394 00:57:07,970 --> 00:57:11,120 on the client and we can actually remove that 1395 00:57:11,480 --> 00:57:13,190 to be able to make this Burke. 1396 00:57:13,490 --> 00:57:16,730 We have to pay attention to the program c as here 1397 00:57:17,000 --> 00:57:18,390 because it says. 1398 00:57:19,073 --> 00:57:19,550 Ah 1399 00:57:19,730 --> 00:57:21,710 regarding the services at Reza components are right 1400 00:57:21,980 --> 00:57:25,580 then interactive server components and also interactive web assembly components. 1401 00:57:25,940 --> 00:57:28,160 This is an essence the important stuff when euro. 1402 00:57:28,520 --> 00:57:31,530 A starting with the auto interactive. 1403 00:57:31,806 --> 00:57:34,410 Random out template option. 1404 00:57:34,640 --> 00:57:34,910 It 1405 00:57:35,060 --> 00:57:36,800 adds these two lines right 1406 00:57:37,070 --> 00:57:39,200 servant activities this line where percent 1407 00:57:39,350 --> 00:57:41,330 this line and also don't hear. 1408 00:57:41,810 --> 00:57:43,260 There is also important. 1409 00:57:44,090 --> 00:57:45,080 Server and a emote 1410 00:57:45,320 --> 00:57:49,710 interact with the web assembly serve a moat and you need the assembly. 1411 00:57:50,090 --> 00:57:54,860 A from the clan project and this is just one way to do it you just get the assembly 1412 00:57:54,980 --> 00:57:55,910 with the 1413 00:57:56,120 --> 00:57:59,360 help of the countess when you remove that i think you have to pay attention than. 1414 00:58:00,201 --> 00:58:01,860 That this still works. 1415 00:58:02,150 --> 00:58:05,120 You don't have to do that for every component of every http page two just need the 1416 00:58:05,120 --> 00:58:08,850 assembly once and this is just one way to get the assembly. 1417 00:58:09,170 --> 00:58:10,520 Of the client project. 1418 00:58:10,910 --> 00:58:12,830 So now he have this here. 1419 00:58:13,190 --> 00:58:15,871 On the client but you see already. 1420 00:58:15,950 --> 00:58:17,522 Wait a second. 1421 00:58:17,721 --> 00:58:18,860 As a problem here. 1422 00:58:19,370 --> 00:58:21,530 We want to use that serve this 1423 00:58:21,830 --> 00:58:24,860 you want to use that entity so what can we do. 1424 00:58:25,280 --> 00:58:26,280 Well. 1425 00:58:26,570 --> 00:58:27,570 Actually. 1426 00:58:28,250 --> 00:58:29,250 I. 1427 00:58:29,540 --> 00:58:30,110 Can we 1428 00:58:30,290 --> 00:58:32,520 know we we cannot really reference. 1429 00:58:32,629 --> 00:58:35,030 The the product now riot because here you see. 1430 00:58:35,570 --> 00:58:37,110 That the. 1431 00:58:38,297 --> 00:58:40,170 The client project is referenced. 1432 00:58:40,790 --> 00:58:41,780 Women are try to 1433 00:58:41,990 --> 00:58:44,010 do it the other way. 1434 00:58:44,180 --> 00:58:45,780 This cannot work right. 1435 00:58:45,830 --> 00:58:47,720 Let me just at project reference here 1436 00:58:47,930 --> 00:58:49,040 this the sewer project 1437 00:58:49,340 --> 00:58:52,410 though of course it doesn't because then we would have a circular dependency. 1438 00:58:52,490 --> 00:58:53,420 Does not work. 1439 00:58:53,900 --> 00:58:54,950 So what do we have to do. 1440 00:58:55,370 --> 00:58:58,410 Oh gee i implemented so much stuff. 1441 00:58:58,820 --> 00:58:59,820 Now. 1442 00:59:00,020 --> 00:59:00,710 I have to 1443 00:59:00,860 --> 00:59:06,110 grab everything the entities the services may be even data data context and stuff. 1444 00:59:06,680 --> 00:59:09,450 And put that in a separate projects. 1445 00:59:09,800 --> 00:59:11,870 And when you see that then you see 1446 00:59:11,990 --> 00:59:14,580 again when you're coming from the webassembly world. 1447 00:59:15,560 --> 00:59:17,120 It's pretty much the same thing 1448 00:59:17,360 --> 00:59:21,530 right the sir blazer starve a project then is the web a p i. 1449 00:59:22,070 --> 00:59:24,800 Declined project is our laser weapons and the client 1450 00:59:25,160 --> 00:59:27,020 and then we at a class library 1451 00:59:27,140 --> 00:59:28,820 for all the shout stuff 1452 00:59:28,970 --> 00:59:29,420 it's. 1453 00:59:29,720 --> 00:59:33,410 While it's almost the same not really but let's just continue here. 1454 00:59:33,830 --> 00:59:36,870 We add it's one projects. 1455 00:59:37,550 --> 00:59:38,750 And i really wasn't thinking 1456 00:59:38,900 --> 00:59:39,890 that this. 1457 00:59:40,340 --> 00:59:42,600 Tutorial it's getting that long. 1458 00:59:42,740 --> 00:59:44,760 A class library ants. 1459 00:59:44,870 --> 00:59:46,968 Again bear with me here regarding the architecture 1460 00:59:47,090 --> 00:59:47,960 we can do that 1461 00:59:48,200 --> 00:59:49,160 way better 1462 00:59:49,280 --> 00:59:52,850 and i think i will also make a video about architecture know because it's really 1463 00:59:53,090 --> 00:59:55,460 getting interesting with the new blazer web temper that. 1464 00:59:56,210 --> 00:59:59,288 But for now let's just create a shared project or ride. 1465 00:59:59,450 --> 01:00:01,010 A called it blazer. 1466 01:00:02,030 --> 01:00:03,030 Kratz. 1467 01:00:03,380 --> 01:00:04,640 Dodds net 1468 01:00:04,940 --> 01:00:08,190 aids and now shared okay. 1469 01:00:08,360 --> 01:00:11,760 He could of course also added domain projects. 1470 01:00:12,050 --> 01:00:13,287 Using a layered architecture 1471 01:00:13,400 --> 01:00:14,400 then. 1472 01:00:14,450 --> 01:00:19,190 Maybe a data access lay a business logic layer for the serves and so on or maybe even 1473 01:00:19,190 --> 01:00:22,170 use clean architect attending the comments what do you want to see. 1474 01:00:22,220 --> 01:00:26,060 And i am happy to created then we have the persistence layer. 1475 01:00:26,570 --> 01:00:29,280 The or infrastructure and so on. 1476 01:00:30,110 --> 01:00:33,509 But for now let's just use this shout stuff. 1477 01:00:33,620 --> 01:00:37,070 We remove our example class and now oh my gosh. 1478 01:00:37,550 --> 01:00:42,960 We need the services so let's put them there and lead them here. 1479 01:00:44,120 --> 01:00:47,226 So we have to change the the using 1480 01:00:47,420 --> 01:00:48,600 of the namespaces. 1481 01:00:48,830 --> 01:00:52,170 We need the entity in a mrs claus that. 1482 01:00:52,820 --> 01:00:54,840 Data something we needs. 1483 01:00:56,252 --> 01:00:58,429 He also need the. 1484 01:00:59,316 --> 01:00:59,763 The 1485 01:00:59,882 --> 01:01:04,092 entity and that's what i was talking about and he here. 1486 01:01:05,402 --> 01:01:10,002 Migrations is now also very interesting because. 1487 01:01:10,652 --> 01:01:11,652 We. 1488 01:01:11,926 --> 01:01:13,112 Register 1489 01:01:13,322 --> 01:01:17,072 the data context here bots 1490 01:01:17,222 --> 01:01:22,172 the entity and the db context is here in the 1491 01:01:22,172 --> 01:01:22,772 shared project so you have to pay attention then 1492 01:01:23,042 --> 01:01:24,002 when you use. 1493 01:01:24,452 --> 01:01:28,532 A entity framework with corporate coffers migrations the easiest way to do it is 1494 01:01:28,832 --> 01:01:31,002 you go to the shared folder. 1495 01:01:31,172 --> 01:01:31,952 And then set 1496 01:01:32,192 --> 01:01:32,762 the the 1497 01:01:33,062 --> 01:01:36,942 a project right so for instance if you to think that. 1498 01:01:37,322 --> 01:01:38,762 And see the hulk 1499 01:01:38,882 --> 01:01:40,782 and then you have uttered this. 1500 01:01:40,862 --> 01:01:43,152 Attribute this option here. 1501 01:01:43,382 --> 01:01:47,762 And and with dead then you can set the start a project you so you just do the same 1502 01:01:47,762 --> 01:01:50,642 thing you say migrations add initial for instance 1503 01:01:51,062 --> 01:01:53,192 but then set start a project 1504 01:01:53,312 --> 01:01:53,912 is. 1505 01:01:54,212 --> 01:01:56,132 This thing so you are you have to navigate than 1506 01:01:56,252 --> 01:01:59,382 to this folder but you. 1507 01:01:59,552 --> 01:02:02,942 Are set to run this command in the shared folder then this should work. 1508 01:02:03,512 --> 01:02:08,173 Anyway so here we have now our key opponents still in the Sarah project. 1509 01:02:08,942 --> 01:02:10,052 Couric and button 1510 01:02:10,232 --> 01:02:13,602 great stuff and the migrations as well. 1511 01:02:14,132 --> 01:02:18,032 But now hear what we actually need is the data context year the game here 1512 01:02:18,272 --> 01:02:19,952 the entity and the services again 1513 01:02:20,222 --> 01:02:23,742 you can even separate the concerns even further. 1514 01:02:23,822 --> 01:02:25,782 So that you would have. 1515 01:02:26,072 --> 01:02:28,982 Again a project for just the data context for the entities 1516 01:02:29,192 --> 01:02:32,732 for the services but for now i think for the story it's already long enough. 1517 01:02:33,272 --> 01:02:36,192 So he now we have to change that. 1518 01:02:36,602 --> 01:02:39,372 Lemme fixed the namespaces first. 1519 01:02:39,752 --> 01:02:41,652 So now this is shared. 1520 01:02:43,922 --> 01:02:45,182 So this 1521 01:02:45,422 --> 01:02:47,022 has to be correct right. 1522 01:02:47,432 --> 01:02:50,742 From its make this corrects here shared shared. 1523 01:02:51,152 --> 01:02:53,652 And here as well. 1524 01:02:55,112 --> 01:02:56,072 This should be 1525 01:02:56,222 --> 01:02:58,482 that and that's. 1526 01:02:59,432 --> 01:03:02,582 And here as well nope that 1527 01:03:02,732 --> 01:03:04,892 was not the correct one that's the one. 1528 01:03:05,222 --> 01:03:08,382 When as you can see here we have to also install. 1529 01:03:08,882 --> 01:03:09,632 The 1530 01:03:09,752 --> 01:03:10,922 package. 1531 01:03:12,962 --> 01:03:13,352 Yep 1532 01:03:13,489 --> 01:03:14,952 that's the one. 1533 01:03:15,842 --> 01:03:17,952 Okay so he and of the entity. 1534 01:03:18,662 --> 01:03:21,362 And also the sir this. 1535 01:03:22,594 --> 01:03:23,832 Wait a sec. 1536 01:03:24,272 --> 01:03:24,782 That's. 1537 01:03:25,292 --> 01:03:27,102 A namespace for that's. 1538 01:03:27,932 --> 01:03:30,072 Okay so this should be sets. 1539 01:03:30,302 --> 01:03:34,572 And now let's have a look here in the program c s. 1540 01:03:35,462 --> 01:03:39,042 Shared a can of course we have to reference this but. 1541 01:03:39,842 --> 01:03:39,932 The 1542 01:03:40,169 --> 01:03:42,312 needs it as well so. 1543 01:03:43,382 --> 01:03:46,292 Maybe we can at the dependency here at project reference 1544 01:03:46,442 --> 01:03:48,552 shared folder all rights. 1545 01:03:50,702 --> 01:03:52,932 And with that then. 1546 01:03:53,462 --> 01:03:54,882 Sure about this. 1547 01:03:54,962 --> 01:03:56,382 Is going on here. 1548 01:03:56,942 --> 01:03:58,142 Shared data 1549 01:03:58,352 --> 01:03:59,352 yip. 1550 01:04:00,062 --> 01:04:02,222 Okay if got have service. 1551 01:04:03,872 --> 01:04:05,232 This is corrects. 1552 01:04:05,822 --> 01:04:08,312 And know regarding the dependencies you can see. 1553 01:04:08,762 --> 01:04:12,302 That we've got the shared project referenced in the client projects 1554 01:04:12,454 --> 01:04:12,842 right. 1555 01:04:13,412 --> 01:04:14,762 And with that then 1556 01:04:15,032 --> 01:04:17,492 since the service references the client project 1557 01:04:17,702 --> 01:04:19,842 we also have the shared. 1558 01:04:20,432 --> 01:04:21,542 Project referenced. 1559 01:04:21,872 --> 01:04:27,102 Okay so now this should at least built right let me just rebuilt the solution. 1560 01:04:27,242 --> 01:04:29,468 While i already seen around here. 1561 01:04:30,212 --> 01:04:30,632 Yup 1562 01:04:30,932 --> 01:04:32,862 there was something missing. 1563 01:04:34,654 --> 01:04:35,132 Okay 1564 01:04:35,252 --> 01:04:37,872 and now let's try the and one more time. 1565 01:04:39,003 --> 01:04:40,003 Okay 1566 01:04:40,262 --> 01:04:42,452 and the game service. 1567 01:04:44,132 --> 01:04:48,252 I game sir this so now here we are. 1568 01:04:48,332 --> 01:04:49,632 Yeah of course. 1569 01:04:50,372 --> 01:04:51,182 Me needs 1570 01:04:51,482 --> 01:04:52,812 this thing. 1571 01:04:54,010 --> 01:04:56,832 You know in our using says. 1572 01:04:57,902 --> 01:05:01,082 And on saw the entities. 1573 01:05:03,332 --> 01:05:03,692 And that he 1574 01:05:03,932 --> 01:05:05,862 should be called entities rights. 1575 01:05:06,332 --> 01:05:07,332 Anyways. 1576 01:05:07,742 --> 01:05:08,972 So. 1577 01:05:10,172 --> 01:05:13,602 Also let me have a quick look here in the imports. 1578 01:05:15,632 --> 01:05:17,402 This should actually also be 1579 01:05:17,582 --> 01:05:19,352 shared. 1580 01:05:21,212 --> 01:05:22,212 And. 1581 01:05:22,712 --> 01:05:23,712 Here. 1582 01:05:24,242 --> 01:05:24,872 As 1583 01:05:25,082 --> 01:05:27,512 okay let's have another look 1584 01:05:27,632 --> 01:05:29,162 while there's a lot to think about okay no 1585 01:05:29,312 --> 01:05:30,902 said the migration files 1586 01:05:31,022 --> 01:05:33,072 shirts shared 1587 01:05:33,212 --> 01:05:35,532 okay at least it's building now. 1588 01:05:36,092 --> 01:05:37,632 Can we run it. 1589 01:05:39,212 --> 01:05:43,182 Yep and also runs sonatas go back to the home page. 1590 01:05:43,742 --> 01:05:46,292 You moved everything we go to games. 1591 01:05:47,942 --> 01:05:49,172 Castel works no 1592 01:05:49,292 --> 01:05:50,762 create game 1593 01:05:50,882 --> 01:05:51,602 this connect 1594 01:05:51,752 --> 01:05:53,162 oh still not working 1595 01:05:53,402 --> 01:05:56,552 one of my errors game servers we don't have a game servers. 1596 01:05:57,002 --> 01:05:57,512 Yeah out 1597 01:05:57,812 --> 01:06:01,002 now this is getting really interesting because. 1598 01:06:01,262 --> 01:06:03,372 When we have a look here. 1599 01:06:05,072 --> 01:06:05,582 One. 1600 01:06:06,002 --> 01:06:07,002 Well. 1601 01:06:07,322 --> 01:06:09,362 At first one might assume 1602 01:06:09,542 --> 01:06:09,932 okay 1603 01:06:10,202 --> 01:06:12,282 so now we have the option. 1604 01:06:12,842 --> 01:06:14,132 To use the render modes. 1605 01:06:14,672 --> 01:06:16,502 And whenever we want them 1606 01:06:16,622 --> 01:06:21,512 to use right so meaning when i want to use webassembly here i can just use the web 1607 01:06:21,512 --> 01:06:24,062 assembly and everything just works right. 1608 01:06:24,452 --> 01:06:25,712 Well not really 1609 01:06:25,832 --> 01:06:26,672 this 1610 01:06:26,822 --> 01:06:28,092 is the clients. 1611 01:06:28,232 --> 01:06:33,182 When you have a look here at the frameworks you see Microsoft dot net as well it's. 1612 01:06:33,662 --> 01:06:34,502 Microsoft dot. 1613 01:06:34,982 --> 01:06:36,752 Net core dot app. 1614 01:06:37,202 --> 01:06:38,742 When you have a look here. 1615 01:06:38,972 --> 01:06:42,962 Frameworks we have the same one but also as peanut corp so again 1616 01:06:43,262 --> 01:06:47,852 this means this thing huh has all the web a api i capabilities. 1617 01:06:48,182 --> 01:06:50,742 We are on the server here. 1618 01:06:51,512 --> 01:06:53,012 Now this service. 1619 01:06:53,822 --> 01:06:55,862 Uses the data contexts 1620 01:06:56,012 --> 01:06:56,312 and. 1621 01:06:56,732 --> 01:07:00,012 This can not work on the client. 1622 01:07:00,152 --> 01:07:03,402 This only works on the server. 1623 01:07:04,022 --> 01:07:07,872 So what can we do here well in the and this means. 1624 01:07:08,162 --> 01:07:08,612 That 1625 01:07:08,852 --> 01:07:12,001 still of course with the new boy blazer 1626 01:07:12,182 --> 01:07:15,782 and calling it new blazer because we are not allowed to say blazer united any more 1627 01:07:15,782 --> 01:07:20,290 because it's it's not caught the united it's let's just say dot net a laser. 1628 01:07:21,152 --> 01:07:23,509 And the web assembly render mode. 1629 01:07:23,972 --> 01:07:27,582 We still have to make and a p i call. 1630 01:07:28,832 --> 01:07:29,832 Right. 1631 01:07:29,912 --> 01:07:33,612 So in essence the same we had with dot net seven. 1632 01:07:33,782 --> 01:07:34,652 And before 1633 01:07:34,802 --> 01:07:38,382 so now when you really want to mix that stuff. 1634 01:07:38,792 --> 01:07:44,222 You can use the service directly in a component that is 1635 01:07:44,222 --> 01:07:46,392 placed on the server and uses the server interactive mode. 1636 01:07:47,252 --> 01:07:51,722 But if you want to use the web assembly random mode you still need in a p i call. 1637 01:07:52,082 --> 01:07:54,132 So how the heck. 1638 01:07:54,692 --> 01:07:56,952 Are we implementing this well. 1639 01:07:57,092 --> 01:07:59,072 I told you that already and that's the reason why 1640 01:07:59,192 --> 01:07:59,822 this is a web a 1641 01:07:59,973 --> 01:08:03,582 i hear this project so what we can do is we can simply say. 1642 01:08:03,812 --> 01:08:04,322 At 1643 01:08:04,502 --> 01:08:05,462 a new folder 1644 01:08:05,582 --> 01:08:07,061 called this folder. 1645 01:08:07,323 --> 01:08:08,102 Control us. 1646 01:08:08,732 --> 01:08:10,032 And you know. 1647 01:08:10,625 --> 01:08:11,104 He had a new 1648 01:08:11,316 --> 01:08:12,424 i controller. 1649 01:08:12,782 --> 01:08:14,502 So Eva controller. 1650 01:08:14,942 --> 01:08:15,842 Standard stuff. 1651 01:08:16,202 --> 01:08:18,102 This is now our game controller. 1652 01:08:18,812 --> 01:08:19,682 And in here. 1653 01:08:20,162 --> 01:08:21,912 We and our constructor. 1654 01:08:22,982 --> 01:08:28,637 And are we add Ottawa game service so i game service. 1655 01:08:30,032 --> 01:08:31,262 Service. 1656 01:08:32,552 --> 01:08:34,662 Almost like that. 1657 01:08:34,952 --> 01:08:37,032 We create and assign. 1658 01:08:37,473 --> 01:08:38,882 The fields. 1659 01:08:39,932 --> 01:08:42,132 At the underscore here. 1660 01:08:42,422 --> 01:08:44,142 And then be. 1661 01:08:44,372 --> 01:08:46,112 At an in point to create again 1662 01:08:46,292 --> 01:08:48,582 okay so that should be. 1663 01:08:49,142 --> 01:08:50,132 Ancient e p 1664 01:08:50,282 --> 01:08:51,122 posts 1665 01:08:51,272 --> 01:08:52,382 public 1666 01:08:52,562 --> 01:08:53,562 async 1667 01:08:53,822 --> 01:08:54,822 task. 1668 01:08:55,202 --> 01:08:57,452 Action results game 1669 01:08:57,632 --> 01:08:58,992 we need the entity. 1670 01:09:00,452 --> 01:09:01,752 At games. 1671 01:09:02,342 --> 01:09:03,602 And then again. 1672 01:09:04,142 --> 01:09:08,502 The not added detail here just for this tutorial it is long enough. 1673 01:09:08,792 --> 01:09:09,792 Var. 1674 01:09:10,202 --> 01:09:11,522 Se and at game then 1675 01:09:11,672 --> 01:09:12,842 is awaits 1676 01:09:13,112 --> 01:09:15,422 game service at game andrey return. 1677 01:09:15,872 --> 01:09:16,872 Okay. 1678 01:09:17,132 --> 01:09:18,542 Added game soon he knows. 1679 01:09:19,052 --> 01:09:19,861 First 1680 01:09:20,042 --> 01:09:21,852 implementation of our controller. 1681 01:09:23,822 --> 01:09:28,662 But now we also have to register the http clients and we have to do it. 1682 01:09:29,222 --> 01:09:30,612 On both projects. 1683 01:09:31,172 --> 01:09:34,751 So here we have a program yes you see nothing is registered. 1684 01:09:35,792 --> 01:09:36,792 And. 1685 01:09:37,562 --> 01:09:39,032 I know maybe you thought well. 1686 01:09:39,332 --> 01:09:42,452 Maybe we should first try to register the game service and it 1687 01:09:42,662 --> 01:09:43,902 will work. 1688 01:09:44,252 --> 01:09:44,822 It doesn't 1689 01:09:44,972 --> 01:09:46,962 all right so of course we can. 1690 01:09:47,943 --> 01:09:50,732 The services and we have food but gimme a minute. 1691 01:09:51,332 --> 01:09:53,652 And oh lots of complicated stuff. 1692 01:09:54,062 --> 01:09:55,272 At scoped. 1693 01:09:55,412 --> 01:09:58,697 I game service game service 1694 01:09:59,132 --> 01:10:00,992 and also http. 1695 01:10:02,102 --> 01:10:05,294 Client so that would be billed the. 1696 01:10:05,522 --> 01:10:07,692 Services and scoped. 1697 01:10:08,402 --> 01:10:09,722 And then 1698 01:10:09,872 --> 01:10:11,882 let's call this a sheep he 1699 01:10:12,182 --> 01:10:12,722 is 1700 01:10:12,872 --> 01:10:13,592 and you 1701 01:10:13,742 --> 01:10:13,892 it. 1702 01:10:14,672 --> 01:10:16,712 http clients. 1703 01:10:17,672 --> 01:10:21,962 With a base address and the space address is then you 1704 01:10:22,142 --> 01:10:23,257 you are i. 1705 01:10:23,822 --> 01:10:25,632 With builder. 1706 01:10:26,313 --> 01:10:27,572 Environments. 1707 01:10:28,322 --> 01:10:29,742 Base address 1708 01:10:29,942 --> 01:10:36,332 and we have to do almost the same stuff on the 1709 01:10:36,332 --> 01:10:37,262 server our so actually maybe we can just copy that 1710 01:10:37,382 --> 01:10:39,812 go up to here. 1711 01:10:42,122 --> 01:10:43,902 And now. 1712 01:10:44,162 --> 01:10:45,822 Here we say. 1713 01:10:46,652 --> 01:10:49,452 Well we could hardcode this or say 1714 01:10:49,652 --> 01:10:50,792 configuration. 1715 01:10:51,452 --> 01:10:53,002 So we put this into the. 1716 01:10:53,612 --> 01:10:54,734 App settings. 1717 01:10:55,622 --> 01:10:56,622 Get 1718 01:10:56,732 --> 01:10:57,732 section 1719 01:10:58,112 --> 01:11:00,222 and i will add something like. 1720 01:11:00,302 --> 01:11:02,202 Base your eye. 1721 01:11:03,424 --> 01:11:06,194 It's and from the beneath the value. 1722 01:11:06,584 --> 01:11:07,724 All rights. 1723 01:11:08,344 --> 01:11:10,874 Yeah there's a value short but that's. 1724 01:11:11,224 --> 01:11:11,824 Okay 1725 01:11:11,974 --> 01:11:13,424 and know. 1726 01:11:14,314 --> 01:11:17,210 And the of settings here he say. 1727 01:11:19,024 --> 01:11:20,024 Base. 1728 01:11:20,944 --> 01:11:23,114 Jewelry you re. 1729 01:11:23,644 --> 01:11:23,954 And 1730 01:11:24,090 --> 01:11:25,904 one that this is not a section. 1731 01:11:26,074 --> 01:11:27,794 This is just a string. 1732 01:11:28,324 --> 01:11:30,494 And let me have a quick look. 1733 01:11:31,084 --> 01:11:33,454 And our launch settings. 1734 01:11:34,774 --> 01:11:37,714 That's the one so he just pasted here 1735 01:11:37,834 --> 01:11:41,512 and we should be good to go. 1736 01:11:41,824 --> 01:11:42,824 Rights. 1737 01:11:43,414 --> 01:11:45,074 One nothing's missing. 1738 01:11:45,304 --> 01:11:47,224 We have the services you know a shared folder 1739 01:11:47,464 --> 01:11:47,794 we 1740 01:11:47,914 --> 01:11:50,194 are using actually already. 1741 01:11:50,554 --> 01:11:51,554 This. 1742 01:11:51,934 --> 01:11:52,924 Service here 1743 01:11:53,194 --> 01:11:55,084 wouldn't it be nice if you would 1744 01:11:55,294 --> 01:11:57,574 be really able to use the service 1745 01:11:57,934 --> 01:11:59,984 and we do not have to. 1746 01:12:00,364 --> 01:12:01,024 Adds 1747 01:12:01,264 --> 01:12:04,814 the or inject the http client here. 1748 01:12:04,954 --> 01:12:09,824 And make the a p i call here well let's have a look again. 1749 01:12:10,264 --> 01:12:11,404 Maybe you want to see that. 1750 01:12:11,794 --> 01:12:14,624 We have injected the service here already. 1751 01:12:14,734 --> 01:12:17,194 We can lot this but you see. 1752 01:12:17,704 --> 01:12:20,294 Still doesn't work unable to resolve. 1753 01:12:20,464 --> 01:12:21,934 That was the data context 1754 01:12:22,204 --> 01:12:27,704 where you can try to go down this rabbit hole but in the end it does not work. 1755 01:12:28,174 --> 01:12:32,294 Thanks to dependency injection though what we can do is we can implement. 1756 01:12:32,524 --> 01:12:37,294 Or at another implementation class actually for the i 1757 01:12:37,294 --> 01:12:38,554 game service and call this may be client game service 1758 01:12:38,884 --> 01:12:40,504 and this client game service then 1759 01:12:40,684 --> 01:12:42,094 makes a white guy calls 1760 01:12:42,334 --> 01:12:45,314 to be can really use the same interface. 1761 01:12:45,814 --> 01:12:48,124 The same service in the and also on the client 1762 01:12:48,334 --> 01:12:49,624 but it is nuts 1763 01:12:49,804 --> 01:12:55,414 using the database context directly or a repository or 1764 01:12:55,414 --> 01:12:57,974 whatever it is going to use it is making the h p t b call. 1765 01:12:58,654 --> 01:12:59,464 Great stuff right. 1766 01:12:59,854 --> 01:13:00,364 So. 1767 01:13:00,724 --> 01:13:04,574 At a new item call this clients game. 1768 01:13:05,374 --> 01:13:06,394 Service. 1769 01:13:07,744 --> 01:13:09,615 I game service. 1770 01:13:10,264 --> 01:13:11,524 We implement that 1771 01:13:11,644 --> 01:13:15,844 this is a public class we have of private 1772 01:13:15,970 --> 01:13:18,914 read only http client. 1773 01:13:20,734 --> 01:13:21,734 Clients 1774 01:13:21,848 --> 01:13:24,603 http clients. 1775 01:13:25,654 --> 01:13:27,964 We create a constructor. 1776 01:13:28,834 --> 01:13:31,864 Out of that and you know what we do is 1777 01:13:32,014 --> 01:13:35,474 the same bar results is awaits 1778 01:13:35,644 --> 01:13:37,694 http client. 1779 01:13:38,164 --> 01:13:40,994 Posts as Jason a sink. 1780 01:13:43,534 --> 01:13:46,484 Our game of the you are i know. 1781 01:13:46,746 --> 01:13:47,494 Is 1782 01:13:47,614 --> 01:13:49,004 a p i. 1783 01:13:49,474 --> 01:13:50,474 Game. 1784 01:13:51,484 --> 01:13:54,315 Maybe we can put this in a new line. 1785 01:13:55,834 --> 01:13:57,434 And here. 1786 01:13:57,634 --> 01:13:58,429 Games of 1787 01:13:58,534 --> 01:13:59,674 objects 1788 01:14:00,004 --> 01:14:01,444 and we return 1789 01:14:01,624 --> 01:14:02,624 awaits. 1790 01:14:03,695 --> 01:14:07,064 Results consent read from. 1791 01:14:08,584 --> 01:14:09,994 Jason. 1792 01:14:11,884 --> 01:14:13,534 A sank. 1793 01:14:14,944 --> 01:14:15,364 All. 1794 01:14:15,904 --> 01:14:16,904 Most. 1795 01:14:19,267 --> 01:14:23,625 Like that and that's true you can remove that. 1796 01:14:24,412 --> 01:14:25,624 Let's just see 1797 01:14:25,774 --> 01:14:26,764 but of course 1798 01:14:26,914 --> 01:14:28,624 regarding the registration or here 1799 01:14:28,894 --> 01:14:32,272 he said of the game service this is not the clients. 1800 01:14:32,734 --> 01:14:33,814 Game service 1801 01:14:33,964 --> 01:14:34,834 said finance 1802 01:14:34,984 --> 01:14:35,583 and develop 1803 01:14:35,704 --> 01:14:36,694 go back to home 1804 01:14:36,904 --> 01:14:38,294 reload that. 1805 01:14:38,374 --> 01:14:39,735 And we go to games. 1806 01:14:40,984 --> 01:14:42,884 You want to create a game. 1807 01:14:44,044 --> 01:14:48,544 No error a website connection is closed we have a web assembly 1808 01:14:48,664 --> 01:14:50,294 and now let's ants. 1809 01:14:50,644 --> 01:14:58,444 Allies of p for instance sand it does not work because of course i forgot one thing 1810 01:14:58,564 --> 01:15:01,004 i already see all the hate comments. 1811 01:15:02,044 --> 01:15:07,714 We have to add the control our capabilities year of course because this is no 1812 01:15:07,894 --> 01:15:14,540 web api i by default let's say so what we have to do is here first builder 1813 01:15:14,644 --> 01:15:16,144 services 1814 01:15:16,354 --> 01:15:18,788 and control last. 1815 01:15:19,624 --> 01:15:20,644 Rights 1816 01:15:21,094 --> 01:15:23,004 and do one here. 1817 01:15:23,794 --> 01:15:27,374 We also have to at the middleware so. 1818 01:15:27,544 --> 01:15:28,544 Use. 1819 01:15:28,954 --> 01:15:30,706 Or not use map. 1820 01:15:32,014 --> 01:15:34,306 Control us. 1821 01:15:34,807 --> 01:15:35,284 Like 1822 01:15:35,404 --> 01:15:36,454 Vance. 1823 01:15:37,534 --> 01:15:38,834 And now. 1824 01:15:40,144 --> 01:15:41,594 Drum roll. 1825 01:15:42,154 --> 01:15:43,934 Life of pi. 1826 01:15:46,114 --> 01:15:47,464 Nothing happens 1827 01:15:47,584 --> 01:15:49,405 to we see that here. 1828 01:15:50,134 --> 01:15:52,604 While let's just go to the list of games. 1829 01:15:52,744 --> 01:15:56,235 There it is we should add some feedback may be right. 1830 01:15:56,404 --> 01:15:59,054 So then it would see that it works but. 1831 01:15:59,284 --> 01:16:00,284 Now. 1832 01:16:01,024 --> 01:16:01,864 We have covered 1833 01:16:02,044 --> 01:16:04,834 all the animals are ready i know auto is not covered yet 1834 01:16:05,224 --> 01:16:06,854 but in essence. 1835 01:16:06,964 --> 01:16:10,424 This just means that here now. 1836 01:16:10,474 --> 01:16:12,076 In our why. 1837 01:16:12,334 --> 01:16:13,834 Not shared it is here in the 1838 01:16:13,954 --> 01:16:14,584 edit game. 1839 01:16:15,064 --> 01:16:19,444 Be could of course say here instead of webassembly one use the auto mode. 1840 01:16:19,804 --> 01:16:21,524 You restart the application. 1841 01:16:22,924 --> 01:16:28,094 And then also remove everything here clear side data. 1842 01:16:28,384 --> 01:16:30,304 We go to the console. 1843 01:16:31,534 --> 01:16:33,974 And of course here. 1844 01:16:34,084 --> 01:16:36,274 For the button does the website connection. 1845 01:16:36,664 --> 01:16:38,505 Mvc create game. 1846 01:16:39,874 --> 01:16:40,874 And. 1847 01:16:41,194 --> 01:16:44,924 Now here it should use the a websocket actually. 1848 01:16:45,724 --> 01:16:49,399 See that we still have this connection so when we now. 1849 01:16:49,594 --> 01:16:51,312 Say a lots. 1850 01:16:52,111 --> 01:16:53,914 Of the fallen. 1851 01:16:55,954 --> 01:16:56,669 Okay 1852 01:16:56,944 --> 01:16:58,234 see some messages here. 1853 01:16:58,655 --> 01:17:01,964 The submits something is happening right. 1854 01:17:02,194 --> 01:17:04,386 Don't know if we see that here. 1855 01:17:06,004 --> 01:17:08,654 I'm not a web sockets or signal our expert. 1856 01:17:09,334 --> 01:17:09,604 But. 1857 01:17:10,192 --> 01:17:11,192 Something. 1858 01:17:12,244 --> 01:17:14,233 Something was happening here ride. 1859 01:17:14,627 --> 01:17:15,064 A race. 1860 01:17:15,484 --> 01:17:18,904 So now we see this game here as well. 1861 01:17:19,444 --> 01:17:21,184 And again that have paid. 1862 01:17:21,514 --> 01:17:21,874 That's 1863 01:17:22,024 --> 01:17:24,304 pay attention here to the a console. 1864 01:17:24,664 --> 01:17:25,894 Women are reload that. 1865 01:17:26,344 --> 01:17:30,344 No web sockets whatsoever right now we have the. 1866 01:17:30,394 --> 01:17:30,783 Ah 1867 01:17:30,994 --> 01:17:33,934 there wasn't files downloaded so here we also see no 1868 01:17:34,114 --> 01:17:35,474 web sockets. 1869 01:17:35,674 --> 01:17:39,304 Connection for that all right this is great so now 1870 01:17:39,574 --> 01:17:41,734 in essence be covered everything already 1871 01:17:41,854 --> 01:17:45,134 but let's just finish up the crud operations meaning. 1872 01:17:45,214 --> 01:17:47,914 Only updating and deleting is left. 1873 01:17:48,304 --> 01:17:49,304 So. 1874 01:17:49,624 --> 01:17:55,564 It's up to you you do you want to do that with the server or do you want to do that 1875 01:17:55,564 --> 01:17:58,337 with the web assembly render mode. 1876 01:17:58,744 --> 01:18:04,414 Again we have our game list here what i would 1877 01:18:04,414 --> 01:18:05,164 like to do is add and edit button here as well. 1878 01:18:05,524 --> 01:18:07,954 So similar to that staff may be can just 1879 01:18:08,074 --> 01:18:10,154 copy and paste this here. 1880 01:18:10,474 --> 01:18:11,344 And as is now and. 1881 01:18:11,914 --> 01:18:14,914 Edit game button so let's continue with the. 1882 01:18:15,484 --> 01:18:17,054 Editing or updating. 1883 01:18:17,194 --> 01:18:21,103 Of a game and know he reaches say. 1884 01:18:21,364 --> 01:18:22,695 Edit game. 1885 01:18:23,614 --> 01:18:24,391 Method is called a 1886 01:18:24,571 --> 01:18:27,424 actually we need an ID so this is going to be interesting 1887 01:18:27,574 --> 01:18:30,104 so let's add parameter here. 1888 01:18:31,024 --> 01:18:32,444 And ID. 1889 01:18:33,334 --> 01:18:35,324 This is a for amateur. 1890 01:18:35,854 --> 01:18:37,566 And he and always say. 1891 01:18:38,254 --> 01:18:38,613 And it's 1892 01:18:38,734 --> 01:18:39,734 game. 1893 01:18:41,434 --> 01:18:43,634 That method here and it's. 1894 01:18:43,804 --> 01:18:44,884 Game. 1895 01:18:47,194 --> 01:18:47,554 Well 1896 01:18:47,704 --> 01:18:49,694 it can do like that then actually. 1897 01:18:51,034 --> 01:18:52,624 Added game 1898 01:18:52,894 --> 01:18:54,224 and here. 1899 01:18:54,634 --> 01:18:55,934 We say. 1900 01:18:56,764 --> 01:18:58,054 Edit a game 1901 01:18:58,175 --> 01:18:59,753 with the. 1902 01:18:59,914 --> 01:19:00,144 I 1903 01:19:00,244 --> 01:19:00,813 d 1904 01:19:00,994 --> 01:19:02,144 all right. 1905 01:19:03,634 --> 01:19:09,424 This should be our button we have the html button with this function you have the 1906 01:19:09,694 --> 01:19:11,374 ID parameter here. 1907 01:19:11,704 --> 01:19:15,914 Navigates us to edit to the page and it game with the ID. 1908 01:19:16,114 --> 01:19:17,114 Parameter 1909 01:19:17,224 --> 01:19:20,134 and now and we go to i want game list 1910 01:19:20,254 --> 01:19:22,024 we just at the spot in here. 1911 01:19:22,414 --> 01:19:23,744 So edits. 1912 01:19:24,553 --> 01:19:25,553 Game. 1913 01:19:26,644 --> 01:19:28,714 That's the one 1914 01:19:28,864 --> 01:19:31,514 but the to look. 1915 01:19:31,926 --> 01:19:32,061 At 1916 01:19:32,164 --> 01:19:34,154 game why is it. 1917 01:19:35,015 --> 01:19:36,814 Game button that's the one yet. 1918 01:19:37,234 --> 01:19:39,374 With the i d. 1919 01:19:39,634 --> 01:19:40,634 Game. 1920 01:19:41,854 --> 01:19:43,634 I d. 1921 01:19:43,864 --> 01:19:46,311 This should be it. 1922 01:19:47,104 --> 01:19:48,904 Random out server. 1923 01:19:49,354 --> 01:19:50,504 All right. 1924 01:19:50,554 --> 01:19:51,704 And now. 1925 01:19:51,904 --> 01:19:54,854 Since we are here already on the client. 1926 01:19:56,194 --> 01:19:59,534 Client game service at a game. 1927 01:19:59,704 --> 01:20:02,354 Be well we need. 1928 01:20:03,064 --> 01:20:04,844 To implement also. 1929 01:20:04,954 --> 01:20:07,094 The a p i call again. 1930 01:20:07,174 --> 01:20:08,174 And. 1931 01:20:08,944 --> 01:20:09,304 Well. 1932 01:20:09,874 --> 01:20:11,224 Just grabbed the ID right. 1933 01:20:11,584 --> 01:20:16,394 So we have it already here in our route and here's the corresponding parameter. 1934 01:20:16,564 --> 01:20:17,794 Nord we can do is. 1935 01:20:18,124 --> 01:20:20,922 We can check if the. 1936 01:20:21,064 --> 01:20:22,664 Idea is now. 1937 01:20:22,834 --> 01:20:26,263 Then read this play this title here. 1938 01:20:27,214 --> 01:20:29,744 But otherwise we say. 1939 01:20:30,934 --> 01:20:32,132 This is 1940 01:20:32,404 --> 01:20:35,824 edits and then we have a game should have a game because. 1941 01:20:36,424 --> 01:20:36,882 On 1942 01:20:37,174 --> 01:20:37,926 when been the pyramid 1943 01:20:38,050 --> 01:20:38,824 have been set 1944 01:20:39,124 --> 01:20:41,194 then i just say game 1945 01:20:41,344 --> 01:20:42,004 name. 1946 01:20:42,364 --> 01:20:43,364 Alright. 1947 01:20:43,564 --> 01:20:46,154 So this would then be a war header. 1948 01:20:46,624 --> 01:20:46,864 Okay. 1949 01:20:47,554 --> 01:20:48,574 And he now 1950 01:20:48,814 --> 01:20:51,114 let's say protects it. 1951 01:20:51,574 --> 01:20:52,984 Overrides 1952 01:20:53,134 --> 01:20:54,754 on the parameters set 1953 01:20:54,904 --> 01:20:56,144 a sink. 1954 01:20:56,554 --> 01:21:00,244 We say while could be the case that the game does not exist but. 1955 01:21:00,784 --> 01:21:01,474 Let's just say. 1956 01:21:02,074 --> 01:21:03,074 Game. 1957 01:21:03,244 --> 01:21:05,254 Is now a game service. 1958 01:21:07,566 --> 01:21:09,676 Actually get game by. 1959 01:21:10,056 --> 01:21:11,056 ID. 1960 01:21:11,278 --> 01:21:13,456 Don't have this method yet 1961 01:21:13,566 --> 01:21:15,246 but let's implemented real quick. 1962 01:21:15,666 --> 01:21:17,148 So he now. 1963 01:21:18,006 --> 01:21:18,786 Task 1964 01:21:18,936 --> 01:21:19,936 game. 1965 01:21:21,666 --> 01:21:22,536 Get game 1966 01:21:22,746 --> 01:21:24,366 by ID 1967 01:21:24,516 --> 01:21:25,516 and. 1968 01:21:25,686 --> 01:21:27,346 I d. 1969 01:21:27,756 --> 01:21:31,096 And now we have to implemented here. 1970 01:21:31,656 --> 01:21:33,406 As well so. 1971 01:21:34,146 --> 01:21:36,406 Here this should simply be. 1972 01:21:36,769 --> 01:21:37,506 Turn 1973 01:21:37,716 --> 01:21:40,266 awaits contexts 1974 01:21:40,391 --> 01:21:41,436 the game it's. 1975 01:21:41,796 --> 01:21:43,396 Find a sink. 1976 01:21:43,986 --> 01:21:47,526 And then simply the ID yes could be no but. 1977 01:21:47,916 --> 01:21:48,365 Again 1978 01:21:48,486 --> 01:21:49,536 don't care for now. 1979 01:21:50,076 --> 01:21:51,646 And are regarding the client. 1980 01:21:52,776 --> 01:21:54,646 Similar stuff. 1981 01:21:55,326 --> 01:21:57,388 You know always saying gameboy 1982 01:21:57,494 --> 01:21:58,659 a d. 1983 01:21:59,166 --> 01:22:02,506 We say football results is awaits. 1984 01:22:02,676 --> 01:22:06,246 http clients get from and Jason 1985 01:22:06,426 --> 01:22:09,256 a sink and this is no. 1986 01:22:10,146 --> 01:22:11,338 A p i. 1987 01:22:11,646 --> 01:22:12,756 Game. 1988 01:22:13,236 --> 01:22:15,049 We need the only he. 1989 01:22:16,356 --> 01:22:17,046 So 1990 01:22:17,229 --> 01:22:17,480 are 1991 01:22:17,640 --> 01:22:20,032 the ID ID here. 1992 01:22:20,796 --> 01:22:23,536 This is the i d then. 1993 01:22:24,546 --> 01:22:28,096 All rights and this should be a game. 1994 01:22:28,868 --> 01:22:31,116 Like that and we return the 1995 01:22:31,273 --> 01:22:32,286 results. 1996 01:22:33,675 --> 01:22:37,516 Like that okay and now here we say. 1997 01:22:37,986 --> 01:22:38,986 Awaits. 1998 01:22:40,026 --> 01:22:40,806 A sink 1999 01:22:40,926 --> 01:22:42,706 and turn the ID. 2000 01:22:43,566 --> 01:22:44,346 Into an 2001 01:22:44,556 --> 01:22:45,306 integer 2002 01:22:45,456 --> 01:22:47,506 okay i'm sure i forgot something. 2003 01:22:48,246 --> 01:22:51,916 Just want to check if we get the game with the title. 2004 01:22:52,266 --> 01:22:54,228 So now here we go to games. 2005 01:22:55,866 --> 01:22:57,786 We see your beautiful buttons here. 2006 01:22:58,206 --> 01:22:58,926 Edit game. 2007 01:22:59,226 --> 01:23:00,551 Me see cyberpunk. 2008 01:23:00,726 --> 01:23:02,476 Again it's have a look at the console. 2009 01:23:03,276 --> 01:23:05,596 And as refresh this thing. 2010 01:23:05,766 --> 01:23:09,079 And go to oh we already have an hour and the slice. 2011 01:23:10,026 --> 01:23:10,746 Be 2012 01:23:10,866 --> 01:23:12,396 cause 2013 01:23:12,606 --> 01:23:14,596 yeah controller 2014 01:23:14,766 --> 01:23:15,396 yeah 2015 01:23:15,516 --> 01:23:17,266 we have of course. 2016 01:23:17,586 --> 01:23:18,456 We have to at 2017 01:23:18,601 --> 01:23:21,706 the and point here as well so many. 2018 01:23:21,756 --> 01:23:25,006 Stuff to think about now http gets. 2019 01:23:25,716 --> 01:23:28,666 While i think when we used to it then it's okay. 2020 01:23:29,574 --> 01:23:31,066 The game by. 2021 01:23:31,116 --> 01:23:32,116 ID. 2022 01:23:33,606 --> 01:23:34,416 In the game. 2023 01:23:34,806 --> 01:23:35,376 Of the game 2024 01:23:35,496 --> 01:23:36,496 ID. 2025 01:23:37,595 --> 01:23:39,666 Good came by ID. 2026 01:23:40,146 --> 01:23:40,625 On 2027 01:23:40,806 --> 01:23:41,806 t. 2028 01:23:42,216 --> 01:23:43,816 And this is just. 2029 01:23:44,916 --> 01:23:46,036 The game. 2030 01:23:46,716 --> 01:23:47,406 Rights 2031 01:23:47,556 --> 01:23:48,816 so one more time 2032 01:23:48,966 --> 01:23:50,496 yes now we get the game 2033 01:23:50,676 --> 01:23:51,276 okay. 2034 01:23:51,606 --> 01:23:52,606 So 2035 01:23:52,722 --> 01:23:54,136 last of us. 2036 01:23:55,537 --> 01:23:57,016 Last of us. 2037 01:23:58,236 --> 01:23:59,568 Games and 2038 01:23:59,736 --> 01:24:00,736 game. 2039 01:24:02,856 --> 01:24:03,336 And it's. 2040 01:24:03,816 --> 01:24:06,276 Every time it's disconnecting the web sockets a king 2041 01:24:06,396 --> 01:24:07,416 interesting stuff really. 2042 01:24:08,016 --> 01:24:09,726 So now we can we can. 2043 01:24:10,386 --> 01:24:11,886 Well get our game 2044 01:24:12,276 --> 01:24:16,216 and now we need the updating the editing so here. 2045 01:24:16,536 --> 01:24:19,427 We need another method first. 2046 01:24:19,836 --> 01:24:22,696 To edit the game game. 2047 01:24:24,396 --> 01:24:26,682 Task and may be answered the i 2048 01:24:26,796 --> 01:24:27,796 the 2049 01:24:27,906 --> 01:24:30,736 and it's also already implement deleting. 2050 01:24:31,386 --> 01:24:33,466 So he and i just say. 2051 01:24:34,566 --> 01:24:37,486 Maybe return of bullying value. 2052 01:24:38,136 --> 01:24:38,664 To leave the 2053 01:24:38,856 --> 01:24:39,856 game. 2054 01:24:39,936 --> 01:24:43,896 With the ID and on as implement that no first the 2055 01:24:44,076 --> 01:24:45,640 service service. 2056 01:24:46,896 --> 01:24:48,707 So here know. 2057 01:24:49,866 --> 01:24:54,306 Delete would be first of all db game 2058 01:24:54,456 --> 01:24:55,456 async. 2059 01:24:56,946 --> 01:25:00,586 If t v game is not now then we say. 2060 01:25:01,236 --> 01:25:02,856 Contexts remove 2061 01:25:03,036 --> 01:25:04,816 db game. 2062 01:25:05,466 --> 01:25:07,596 And awaits contexts. 2063 01:25:08,256 --> 01:25:09,696 Save changes 2064 01:25:09,876 --> 01:25:11,116 a sink. 2065 01:25:12,216 --> 01:25:12,876 Return 2066 01:25:13,086 --> 01:25:14,086 true. 2067 01:25:15,426 --> 01:25:17,536 Else we return false. 2068 01:25:18,006 --> 01:25:20,196 And now updating 2069 01:25:20,346 --> 01:25:21,156 where is it 2070 01:25:21,306 --> 01:25:22,083 at the need 2071 01:25:22,266 --> 01:25:23,566 edit game. 2072 01:25:24,786 --> 01:25:26,026 Same stuff. 2073 01:25:26,076 --> 01:25:27,258 And beginning. 2074 01:25:28,057 --> 01:25:28,686 Me say 2075 01:25:28,836 --> 01:25:29,836 this. 2076 01:25:30,096 --> 01:25:32,806 And then here we say. 2077 01:25:33,216 --> 01:25:33,666 Do. 2078 01:25:34,086 --> 01:25:34,476 Well. 2079 01:25:34,996 --> 01:25:36,616 If the db game. 2080 01:25:37,236 --> 01:25:38,626 Is not now. 2081 01:25:39,966 --> 01:25:40,686 Then 2082 01:25:40,877 --> 01:25:42,636 we say. 2083 01:25:43,176 --> 01:25:45,136 Simply the db game. 2084 01:25:45,336 --> 01:25:47,056 Name is now. 2085 01:25:47,676 --> 01:25:48,186 The 2086 01:25:48,306 --> 01:25:50,346 game named as the updated game 2087 01:25:50,556 --> 01:25:51,556 alright. 2088 01:25:51,696 --> 01:25:52,026 And then. 2089 01:25:52,416 --> 01:25:54,046 Again awaits. 2090 01:25:54,666 --> 01:25:57,017 Context safe change say sink. 2091 01:25:57,606 --> 01:25:59,296 And we return. 2092 01:26:01,116 --> 01:26:02,746 The new db game. 2093 01:26:03,936 --> 01:26:07,216 And of it is now the envy again just throw. 2094 01:26:07,386 --> 01:26:08,686 And you exception. 2095 01:26:10,896 --> 01:26:12,436 With game. 2096 01:26:12,816 --> 01:26:13,996 But fault. 2097 01:26:14,766 --> 01:26:17,926 Something like that and now he regarding the client. 2098 01:26:19,356 --> 01:26:20,046 And we. 2099 01:26:20,556 --> 01:26:23,296 Have to answer at the and points of course. 2100 01:26:23,376 --> 01:26:24,556 No here. 2101 01:26:25,404 --> 01:26:26,646 That would be 2102 01:26:26,766 --> 01:26:28,056 about results. 2103 01:26:30,038 --> 01:26:31,086 Awaits. 2104 01:26:32,586 --> 01:26:33,366 Also 2105 01:26:33,606 --> 01:26:35,046 http clients 2106 01:26:35,196 --> 01:26:36,976 lead a sink. 2107 01:26:37,866 --> 01:26:38,866 With 2108 01:26:39,006 --> 01:26:39,962 a p i 2109 01:26:40,214 --> 01:26:41,214 game. 2110 01:26:42,366 --> 01:26:44,046 And then the ID. 2111 01:26:45,606 --> 01:26:46,235 Return 2112 01:26:46,387 --> 01:26:48,916 results and edit. 2113 01:26:49,536 --> 01:26:49,956 Would 2114 01:26:50,106 --> 01:26:51,106 be. 2115 01:26:52,716 --> 01:26:53,716 Awaits. 2116 01:26:54,276 --> 01:26:55,912 http clients. 2117 01:26:57,636 --> 01:27:00,856 Puts s adjacent a sink. 2118 01:27:02,287 --> 01:27:03,156 That'll be 2119 01:27:03,276 --> 01:27:04,726 a p i. 2120 01:27:04,776 --> 01:27:05,776 Game. 2121 01:27:06,937 --> 01:27:07,937 Then. 2122 01:27:08,077 --> 01:27:10,876 The i d and here. 2123 01:27:11,736 --> 01:27:13,036 Our game. 2124 01:27:14,286 --> 01:27:16,426 And we return. 2125 01:27:17,564 --> 01:27:18,606 Results. 2126 01:27:20,226 --> 01:27:22,246 Content actually. 2127 01:27:23,641 --> 01:27:25,633 Is it know we return. 2128 01:27:27,336 --> 01:27:28,620 There is. 2129 01:27:29,466 --> 01:27:30,651 The stuff. 2130 01:27:31,716 --> 01:27:32,646 And here 2131 01:27:32,766 --> 01:27:33,766 yeah. 2132 01:27:35,646 --> 01:27:36,797 All rights. 2133 01:27:37,026 --> 01:27:38,446 Nor the and points. 2134 01:27:40,386 --> 01:27:41,316 Game controller 2135 01:27:41,436 --> 01:27:45,826 we have a posts he also have a putsch. 2136 01:27:47,676 --> 01:27:49,666 So the put would be. 2137 01:27:52,056 --> 01:27:53,315 And the game. 2138 01:27:54,456 --> 01:27:55,666 And ID. 2139 01:27:56,016 --> 01:27:56,706 Game 2140 01:27:56,886 --> 01:27:58,488 update its. 2141 01:28:00,155 --> 01:28:00,876 Game 2142 01:28:01,056 --> 01:28:02,916 and he of course the ID 2143 01:28:03,096 --> 01:28:04,576 and now here. 2144 01:28:05,826 --> 01:28:06,826 Deletes. 2145 01:28:08,406 --> 01:28:09,996 Also with the ID 2146 01:28:10,206 --> 01:28:11,476 and ID. 2147 01:28:13,326 --> 01:28:15,156 And we have. 2148 01:28:15,516 --> 01:28:16,296 The late 2149 01:28:16,476 --> 01:28:17,476 game. 2150 01:28:19,626 --> 01:28:20,626 I. 2151 01:28:21,516 --> 01:28:23,556 And this is actually. 2152 01:28:24,756 --> 01:28:27,666 Let's just call that results ups 2153 01:28:27,816 --> 01:28:28,566 all rights. 2154 01:28:28,866 --> 01:28:29,976 Show me the tables 2155 01:28:30,096 --> 01:28:31,096 well. 2156 01:28:31,477 --> 01:28:32,646 Added all the Sarah stuff 2157 01:28:33,066 --> 01:28:35,326 but it didn't implement anything regarding. 2158 01:28:35,466 --> 01:28:36,466 Updating. 2159 01:28:36,516 --> 01:28:37,566 Or deleting on the client. 2160 01:28:37,956 --> 01:28:40,156 So what i actually wanted to do. 2161 01:28:40,686 --> 01:28:41,796 Is. 2162 01:28:42,156 --> 01:28:43,935 He know handled submit. 2163 01:28:44,526 --> 01:28:46,966 If a the i d. 2164 01:28:48,197 --> 01:28:49,446 Is now. 2165 01:28:50,316 --> 01:28:51,846 Then of course 2166 01:28:51,966 --> 01:28:54,466 we at it but else. 2167 01:28:56,466 --> 01:28:59,146 We call added game. 2168 01:28:59,886 --> 01:29:02,506 With the i d here. 2169 01:29:03,396 --> 01:29:04,056 And 2170 01:29:04,176 --> 01:29:06,557 this should be then an integer. 2171 01:29:06,816 --> 01:29:10,966 And it's also say async task the lead game. 2172 01:29:12,216 --> 01:29:13,876 With an ID. 2173 01:29:15,097 --> 01:29:15,846 Is then 2174 01:29:16,056 --> 01:29:18,096 awaits game service. 2175 01:29:18,996 --> 01:29:21,106 To lead the game with. 2176 01:29:22,626 --> 01:29:23,926 The ID. 2177 01:29:24,906 --> 01:29:25,906 Well. 2178 01:29:26,286 --> 01:29:27,216 That already is an 2179 01:29:27,396 --> 01:29:28,396 integer. 2180 01:29:29,196 --> 01:29:30,196 Okay. 2181 01:29:31,656 --> 01:29:33,276 And now. 2182 01:29:34,476 --> 01:29:36,186 We should be able 2183 01:29:36,336 --> 01:29:40,216 to add the delete button here as well. 2184 01:29:41,676 --> 01:29:44,526 Maybe inside the form so. 2185 01:29:45,426 --> 01:29:46,696 Add if. 2186 01:29:47,616 --> 01:29:49,455 ID is not now. 2187 01:29:50,646 --> 01:29:52,456 Then we ads. 2188 01:29:54,006 --> 01:29:57,796 This thing here in this is now type of butter not submit. 2189 01:29:59,406 --> 01:30:00,065 There's something in 2190 01:30:00,306 --> 01:30:01,386 danger i guess 2191 01:30:01,540 --> 01:30:03,556 the leads and. 2192 01:30:03,726 --> 01:30:05,986 On click. 2193 01:30:06,906 --> 01:30:08,836 We call. 2194 01:30:11,136 --> 01:30:11,916 The league game 2195 01:30:12,096 --> 01:30:12,786 actually 2196 01:30:13,028 --> 01:30:15,376 don't need the idea we already have it. 2197 01:30:16,416 --> 01:30:17,416 So. 2198 01:30:18,006 --> 01:30:18,486 And. 2199 01:30:18,906 --> 01:30:19,326 ID 2200 01:30:19,476 --> 01:30:20,646 not sure of this works 2201 01:30:20,766 --> 01:30:21,516 but let's see. 2202 01:30:22,086 --> 01:30:23,016 Restart the app 2203 01:30:23,166 --> 01:30:25,566 we have the delete button he know arrow 2204 01:30:25,836 --> 01:30:30,336 is it is nope no errors so far this is nice. 2205 01:30:32,226 --> 01:30:36,426 Let's just start from the beginning we have hello world 2206 01:30:36,516 --> 01:30:38,556 we go to the game lists he go through the last of us. 2207 01:30:38,946 --> 01:30:42,186 Now it's loss of us to we had submits. 2208 01:30:43,116 --> 01:30:46,276 That something happen i should really implement feedback. 2209 01:30:46,656 --> 01:30:49,336 Yet plus of us to this this nice. 2210 01:30:49,926 --> 01:30:50,706 Again 2211 01:30:50,833 --> 01:30:52,386 me go go here. 2212 01:30:53,856 --> 01:30:55,116 This was the puts 2213 01:30:55,266 --> 01:30:57,736 the snow the payloads preview. 2214 01:30:58,266 --> 01:31:04,126 Ice and now again i dunno lies of our the loss of us and deleted. 2215 01:31:05,346 --> 01:31:07,096 And now we go back. 2216 01:31:08,904 --> 01:31:09,444 The lead 2217 01:31:09,594 --> 01:31:10,313 okay 2218 01:31:10,434 --> 01:31:12,034 go back to the games. 2219 01:31:12,354 --> 01:31:12,954 It's gone 2220 01:31:13,254 --> 01:31:15,064 all right i think. 2221 01:31:15,414 --> 01:31:17,814 You're done this is enough 2222 01:31:17,994 --> 01:31:18,994 and. 2223 01:31:19,074 --> 01:31:22,744 If you're still with me thank you so much for watching. 2224 01:31:23,304 --> 01:31:24,324 I really didn't expect 2225 01:31:24,594 --> 01:31:26,244 this stutter to be that long 2226 01:31:26,544 --> 01:31:28,254 but i guess be covered lots of stuff. 2227 01:31:28,764 --> 01:31:34,024 And well this is the direction of your heads with blazer and dot net eight. 2228 01:31:34,554 --> 01:31:35,274 And it's heading 2229 01:31:35,454 --> 01:31:36,324 you know what i mean 2230 01:31:36,444 --> 01:31:39,894 if you have questions and i'm sure you have questions please. 2231 01:31:40,254 --> 01:31:44,754 Drop them in the comments and also what what what is your opinion about all that now 2232 01:31:44,754 --> 01:31:47,664 please again drop that in the comments show me 2233 01:31:47,874 --> 01:31:49,644 what you think about all that 2234 01:31:50,034 --> 01:31:54,803 and what are your questions what do you want to see i hope i can answer your 2235 01:31:54,804 --> 01:31:57,514 questions maybe even with more videos. 2236 01:31:57,774 --> 01:32:01,171 So again please just write it down in the comments section. 2237 01:32:01,704 --> 01:32:05,754 Make sure to check out the links in the video description for the source code 2238 01:32:05,844 --> 01:32:08,674 supporting me may be thank you so much again. 2239 01:32:08,814 --> 01:32:09,481 And 2240 01:32:09,684 --> 01:32:13,644 also the dutton bev academy there is something becoming for the twenty twenty four 2241 01:32:13,644 --> 01:32:17,374 edition of the Donald web academy of course we will cover everything. 2242 01:32:17,514 --> 01:32:23,454 Done at eight and done it a blazer related so make sure to join the waiting list there 2243 01:32:23,664 --> 01:32:25,924 again links in the video description 2244 01:32:26,244 --> 01:32:31,014 and yeah last thing again please hit the like button subscribe to my channel for more 2245 01:32:31,014 --> 01:32:34,494 dot net eight and donate blazer content thank you so much. 2246 01:32:35,004 --> 01:32:38,494 And thank you so much for watching and i hope i see you next time. 2247 01:32:38,574 --> 01:32:39,784 Take care. 157230

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.