Пример #1
0
 public void CopyTo(IPostgresEntity source)
 {
     (source as RegistEntity).ID          = ID;
     (source as RegistEntity).Password    = Password;
     (source as RegistEntity).Nickname    = Nickname;
     (source as RegistEntity).PhoneNumber = PhoneNumber;
 }
Пример #2
0
 public void CopyTo(IPostgresEntity source)
 {
     (source as LoginEntity).ID       = ID;
     (source as LoginEntity).Password = Password;
 }
Пример #3
0
 public IPostgresEntity QueryStart(NpgsqlConnection conn, IPostgresEntity source)
 {
     throw new NotImplementedException();
 }
Пример #4
0
 public void CopyTo(IPostgresEntity source)
 {
     (source as ReturnCertEntity).PublicKey  = PublicKey;
     (source as ReturnCertEntity).RefreshKey = RefreshKey;
 }
Пример #5
0
        public static async Task <IPostgresEntity> ExecuteAsync(IPostgresQuery service, IPostgresEntity queryData, Postgres setting)
        {
            IPostgresEntity result;

            using (NpgsqlConnection conn = new NpgsqlConnection(
                       "Server=" + setting.Host +
                       ";Port=" + setting.Port +
                       ";User ID=" + setting.UserId +
                       ";Database=" + setting.DatabaseName +
                       ";Password="******";Enlist=true"))
            {
                //PostgreSQLへ接続
                await conn.OpenAsync();

                result = service.QueryStart(conn, queryData);
                await conn.CloseAsync();
            }
            return(result);
        }