有办法吗?以下内容不起作用:

var customer = constructor.Entity<Customer>();
customer.Property(c => c.Date).DataType("smalldatetime");

最佳答案

customer.Property(c => c.Date).HasStoreType("smalldatetime");

关于c# - 如何将数据类型属性设置为smalldatetime,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2827674/

10-09 03:44