store only date in database not time portion C#
I think you are trying to specify database column type. You could use data annotations as described in this article. Here is an example : [Table(“People”)] public class Person { public int Id { get; set; } [Column(TypeName = “varchar”)] public string Name { get; set; } [Column(TypeName=”date”)] public DateTime DOB { get; set; } … Read more