C#
C#

help

Root Question Message

Duke
Duke9/2/2022
Default value for db entity [Answered]

Hi, scenario goes like this: When a new user registers, I want it to be as frictionless as possible, and generate the tenant on the background while still maintaining null safety. Is this a good pattern to use, so I can set the tenant metadata to the "default" or "placeholder" values untill the user completes onboarding?
public class TenantMetadata
{
    public static TenantMetadata Default = new TenantMetadata()
    {
        Name = "Placeholder",
        Description = "Placeholder",
    };
    
    public string Name { get; set; } = null!;
    public string Description { get; set; } = null!;
}
ContactFrequently Asked QuestionsJoin The DiscordBugs & Feature RequestsTerms & Privacy