But it would be nice to have a list which is supported which not.
When creating table with code first, UseDateTimeAsDate seems not working, the column type still be timestamp(7) not date.
Here is a small sample.
Code: Select all
class Program
{
static void Main(string[] args)
{
var config = OracleEntityProviderConfig.Instance;
config.CodeFirstOptions.UseDateTimeAsDate = true;
var context = new MyDbContext();
context.Database.EnsureCreated();
}
}
class MyDbContext : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseOracle(@"REDACTED");
}
public DbSet<Product> Products { get; set; }
}
class Product
{
[Key]
public int Id { get; set; }
public DateTime Created { get; set; }
}