开发者

How to set data type property as smalldatetime

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; }

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜