I know that this must be an old, tired question, but I can’t find anything through my trusted friend (aka Google).
I have a .net 3.5 C # winforms application that presents the user with a login form when the application starts. After a successful login, I want to escape to the database, pull some user data and save it (in properties) in a class called AppCurrentUser.cs, access to which can be obtained through all assembly classes - the goal is to fill in some properties with a single read data, instead of calling the database every time. In a web application, I usually used session variables, and I know that the concept of this does not exist in WinForms.
The class structure is similar to the following:
public class AppCurrentUser {
public AppCurrentUser() { }
public Guid UserName { get; set; }
public List<string> Roles { get; set; }
public string Firstname { get; set; }
public string Lastname { get; set; }
}
, :
"" , , , ... , , ?
, , , ( , ), "reset" . ( , )
? .
!