I got one big question.
Below is the code I used to store string[]
arrays in database, but I cannot Get them from database.
my Model:
public class TokenTransaction
{
[Key]
public int Id { get; set; }
public string Token { get; set; }
public string[] baskets { get; set; }
}
and MydbContext.cs:
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<TokenTransaction>()
.Property(a => a.baskets).HasConversion(
t => string.Join(';', t),
t => t.Split(';', StringSplitOptions.RemoveEmptyEntries));
}
The code I used to get a database record for that model is:
public TokenTransaction GetTokenTransaction(string InvoiceID)
{
return _Context.TokenTransactions
.FirstOrDefault(t => t.CodePeygiry == InvoiceID);
}
Error in:
SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) -
I don't know why this error appears. Could you please help me to retrieve data from the database?