Apress / blazor-revealed

Source code for 'Blazor Revealed' by Peter Himschoot
https://www.apress.com/9781484243428
Other
21 stars 14 forks source link

Does not work in Visual Studio 2019 preview #2

Open kouroshsalahshoor opened 5 years ago

sdksmm commented 5 years ago

No description provided. Hi you can use my script to create a SQL database for the Blazor Revealed source code; https://github.com/sdksmm/Blazor-Revealed-Unofficial/blob/master/Blazor-Revealed-Unofficial/PizzaPlace070.Server/SQL%20scripts/PizzaDb.sql

kouroshsalahshoor commented 5 years ago

Hi, Thanks a lot. The problem was with the new syntax of the blazor for core 3. Will try to rewrite your program and push it into github. BR kourosh

bastet77 commented 5 years ago

Hi,

I have also had problems with this book and Visual Studio 2019. I am unable to compile as I get a problem in index.razor (index.cshtml) with the onclick AddToBasket lambda expression. onclick="@(() => AddToBasket(pizza))" Flagged as an error:- Cannot convert lambda expression to type 'object' because it is not a delegate type. Any help would be appreciated. Chapter 2 - Data Binding.

kouroshsalahshoor commented 5 years ago

put an @ before onclick: @onclick="@(() => AddToBasket(pizza))"

hope it helps :)

sdksmm commented 5 years ago

Hi guys! I have made a working version of this repo (for VS19), including the SQL script to create the database. You can get it from here: https://github.com/sdksmm/Blazor-Revealed-Unofficial

Let me know if there are any issue related to my repo.

bastet77 commented 5 years ago

Many thanks, that did the trick.

Regards,

Ed Holt

From: Kourosh Salahshoor notifications@github.com Sent: 11 July 2019 07:10 To: Apress/blazor-revealed blazor-revealed@noreply.github.com Cc: bastet77 ed.holt@btinternet.com; Comment comment@noreply.github.com Subject: Re: [Apress/blazor-revealed] Does not work in Visual Studio 2019 preview (#2)

put an @ before onclick: @OnClick https://github.com/OnClick ="@(() => AddToBasket(pizza))"

hope it helps :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Apress/blazor-revealed/issues/2?email_source=notifications&email_token=AAZXITFFXJ2J4VBKLFDQ4FLP63FEBA5CNFSM4H6TI4RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVTU5Y#issuecomment-510343799 , or mute the thread https://github.com/notifications/unsubscribe-auth/AAZXITADZZSCMC5ZS42VSXLP63FEBANCNFSM4H6TI4RA . https://github.com/notifications/beacon/AAZXITDYFTKYZG2RBCR4GF3P63FEBA5CNFSM4H6TI4RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVTU5Y.gif

solvix commented 5 years ago

Putting the @ before onclick was the fix for me.