mirror of
https://github.com/nsnail/FreeSql.git
synced 2025-04-27 13:12:51 +08:00
30 lines
641 B
C#
30 lines
641 B
C#
using FreeSql.DataAnnotations;
|
|
using System;
|
|
using System.Linq;
|
|
using Xunit;
|
|
|
|
namespace FreeSql.Tests.Odbc.PostgreSQL
|
|
{
|
|
public class PostgreSQLDbFirstTest
|
|
{
|
|
[Fact]
|
|
public void GetDatabases()
|
|
{
|
|
|
|
var t1 = g.pgsql.DbFirst.GetDatabases();
|
|
|
|
}
|
|
|
|
[Fact]
|
|
public void GetTablesByDatabase()
|
|
{
|
|
|
|
var t2 = g.pgsql.DbFirst.GetTablesByDatabase(g.pgsql.DbFirst.GetDatabases()[2]);
|
|
|
|
var tb_alltype = t2.Where(a => a.Name == "tb_alltype").FirstOrDefault();
|
|
|
|
var tb_identity = t2.Where(a => a.Name == "test_new").FirstOrDefault();
|
|
}
|
|
}
|
|
}
|