What datatype of PostgreSQL 14.5 for DateTime?

Viewed 36

I am sorry, I revise totally the question.

I have entity

namespace AuthenticationWebApi.Models
{
    public class User
    {
        public int Id { get; set; }
        public string Username { get; set; } = string.Empty;
        public byte[] PasswordHash { get; set; } = new byte[32];
        public byte[] PasswordSalt { get; set; } = new byte[32];
        public string RefreshToken { get; set; } = string.Empty;
        public DateTime TokenCreated { get; set; }
        public DateTime TokenExpires { get; set; }
        public string Role { get; set; } = string.Empty;
    }
}

https://github.com/patrickgod/AuthenticationWebApi/blob/master/AuthenticationWebApi/Models/User.cs . This sample use SQLite , I need use PostgreSQL 14.5

What datatype of PostgreSQL 14.5 for DateTime in .NET 6?

(I did not program C# often, mainly Java)

0 Answers
Related