Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有办法吗?以下不起作用:
var customer = constructor.Entity<Customer>(); customer.Property(c => c.Date).DataType("smalldatetime");
customer.Property(c => c.Date).HasStoreType("smalldatetime");
我的代码优先方法:
[Table("Customer", Schema = "DBSchema")] public class Customer{ [Column("Date", TypeName = "SmallDateTime")] public DateTime Date{ get; set; } }