Is there a way? The following doesn't work:
var customer = constructor.Entity<Customer>();
customer.Property(c => c.Date).Da开发者_Python百科taType("smalldatetime");
customer.Property(c => c.Date).HasStoreType("smalldatetime");
My code first approach:
[Table("Customer", Schema = "DBSchema")]
public class Customer{
[Column("Date", TypeName = "SmallDateTime")]
public DateTime Date{ get; set; }
}
精彩评论