You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Table(nameof(SiteSettings), Schema = "Admin")]
public class SiteSettings : BaseModel
{
public SiteSettings()
{
UniqueId = Guid.NewGuid();
}
[Key]
public override Guid UniqueId { get; set; }
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Code { get; set; }
public SmtpConfig Smtp { get; set; }
public bool EnableEmailConfirmation { get; set; }
public bool EnablePhoneConfirmation { get; set; }
public TimeSpan EmailConfirmationTokenProviderLifespan { get; set; }
public TimeSpan PhoneConfirmationTokenProviderLifespan { get; set; }
public int NotAllowedPreviouslyUsedPasswords { get; set; }
public int ChangePasswordReminderDays { get; set; }
public string EmailsBanList { get; set; }
public string PasswordsBanList { get; set; }
public string AttahmentFileRoot { get; set; }
public bool HttpsEnabled { get; set; }
}
and the SmtpConfig class is
[Owned]
public class SmtpConfig
{
public string Server { get; set; }
public string Username { get; set; }
public string Password { get; set; }
public int Port { get; set; }
public string LocalDomain { get; set; }
public bool UsePickupFolder { get; set; }
public string PickupFolder { get; set; }
public string FromName { get; set; }
public string FromAddress { get; set; }
}
when im try ing to add migrations i got navigation propert error
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Navigation property 'Smtp' on entity type 'SiteSettings' is not virtual. UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor.
The text was updated successfully, but these errors were encountered:
hello there
i have a entity like this
and the SmtpConfig class is
when im try ing to add migrations i got navigation propert error
An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Navigation property 'Smtp' on entity type 'SiteSettings' is not virtual. UseLazyLoadingProxies requires all entity types to be public, unsealed, have virtual navigation properties, and have a public or protected constructor.
The text was updated successfully, but these errors were encountered: