As I learned in ASP.NET Core tutorial form Kudvenkat in youtube, and also learning Blazor from his page, I just want to ask if I didn't want to do the webapi approached in Blazor, and I want to set my own CRUD inside blazor, Can I also do the OOP(Interface
and SqlRepository) on Blazor? actually I'm trying to get it done on Blazor, but I'm having this errors, specially when I'm putting a constructor in partial class, is this possible?
You did not provide any code, explained how the application works, or shared what version of Blazor you are using. If this is a WASM application then more than likely you need Web API or some other service running on a server to invoke CRUD operation on
a remote data store.
hydeinthesky29
Can I also do the OOP(Interface and SqlRepository) on Blazor?
Yes. C# is an object oriented language. However, a repository pattern is often an antipattern. A better approach is a service pattern.
hydeinthesky29
but I'm having this errors, specially when I'm putting a constructor in partial class, is this possible?
We cannot see your code and you did not provide the error. We can only guess what programming problems you are experiencing.
None
0 Points
2 Posts
Blazor - Should I used the OOP Approach on Blazor?
Mar 03, 2021 12:44 PM|hydeinthesky29|LINK
Good Day Everyone
As I learned in ASP.NET Core tutorial form Kudvenkat in youtube, and also learning Blazor from his page, I just want to ask if I didn't want to do the webapi approached in Blazor, and I want to set my own CRUD inside blazor, Can I also do the OOP(Interface and SqlRepository) on Blazor? actually I'm trying to get it done on Blazor, but I'm having this errors, specially when I'm putting a constructor in partial class, is this possible?
thanks everyone
All-Star
53711 Points
24031 Posts
Re: Blazor - Should I used the OOP Approach on Blazor?
Mar 03, 2021 12:57 PM|mgebhard|LINK
You did not provide any code, explained how the application works, or shared what version of Blazor you are using. If this is a WASM application then more than likely you need Web API or some other service running on a server to invoke CRUD operation on a remote data store.
Yes. C# is an object oriented language. However, a repository pattern is often an antipattern. A better approach is a service pattern.
We cannot see your code and you did not provide the error. We can only guess what programming problems you are experiencing.
Contributor
2619 Points
2753 Posts
Re: Blazor - Should I used the OOP Approach on Blazor?
Mar 07, 2021 04:31 AM|wavemaster|LINK
Have you looked at Dapper?
https://www.youtube.com/watch?v=8DNgdphLvag
Member
75 Points
172 Posts
Re: Blazor - Should I used the OOP Approach on Blazor?
Mar 07, 2021 07:59 AM|Prathamesh Shende|LINK
If you are using Blazor WASM go with WebApi. then make services in Blazor Client to call webapi endpoint into it.
As per your question, You are making process complex. Blazor makes web development more easy and robust.