Brutal_Boost
Where does .NET Core fit into the equation on web development?
I’m trying to learn some more about web development. I’ve been learning HTML and CSS for the front end and I’m familiar with C# for the back end. Say I don’t user blazer/razor pages. I decide to use React for the front end and use C# API’s to hit the database. Where would .NET core fit into this webpage?
11 replies
I have some questions about detecting the currently logged in user and how to handle it.
I am working on my first .NET CORE blazor website. I've always just done back end stuff and am working on a full-stack app now. I have a couple of questions.
1. What's the correct way to keep track of the current logged in user? I was thinking I would create a current user class that would hold the current users ID and with that ID I can grab anything I need for that user.
2. More of a design question, but what's the proper way of handling whether a user is logged in or not. Off the top of my head I can think of 3 different ways of handling a user being logged in or not.
1. The user has to login upon accessing the website and can't do anything until logged in (Facebook/Instagram)
2. The user has access to basic information, such as an about page, maybe a pricing page, etc. Then once logged in they have access to more options such as their account settings and the purpose of the website itself, but also still has access to the pages that users who aren't logged into has access to.
3. Similar to the one above, the user has access to specific about pages, pricing, etc. But upon logging in it brings them to an entirely different place where they access the main portion of the website but can't access the same pages a user who isn't logged in can access.
Sorry this is a lot! I didn't know how to structure these for google searches so I wasn't getting any good info.
4 replies
Is there a way to get rid of the Task type on an object?
I am building my first full stack app where I am building a .NET core website and an API for it to make queries to the database.
I am having trouble converting the API returns into the proper formats that I need for the front end. I can't figure out how to convert Task<IEnumerable<Appetizer>> into List<Appetizer>. I've tried a few different solutions and no luck so far.
29 replies