kingofarrows
kingofarrows
CC#
Created by kingofarrows on 1/14/2023 in #help
❔ Recommended Session Approach for WebApplication (React frontend, WebApi backend)
Hey everyone. I'm making a web application with a React frontend and a .NET WebApi backend. Was wondering what is the most recommended way of handling authentication/session that integrates with the [Authorize] attributes of WebApi? I was looking into JWT to try something new, however have seen posts about how it's not the best for handling user sessions and is mainly better for API to API integration. What would you recommend?
8 replies
CC#
Created by kingofarrows on 11/27/2022 in #help
❔ .NET 6.0 - Nullable Strings with Dapper Model Classes
Hey everyone. I have a .NET 6.0 project that uses Dapper to communicate to a database and I have a class which contains properties that map to a table. One of my properties is a string and I'm getting the nullable warning (which goes away when I add the nullable?), however in the table the column is a non nullable string. What would be the recommended approach for this property? I could easily add the nullable? but then it means we can pass null in and out where that is not the case. On the opposite side, I could add a blank string assignment ('public string MyProperty { get; set; } = string.Empty;' ), however this is meant to be a dumb, model class and adding an assignment feels incorrect.
21 replies