asp.net mvc 4 - MVC4 Code First Database type "Date" -
I need the database column for a date data type in MS SQL Server There is a requirement for it, it can not be a
datetime.
I have in my model:
[DataType (DataType.Date)] Public Date Time? Requested expiration date {Received; Set; } This still creates the column as an empty date time. Is there any way to do this before date ?
In my model, instead of using the very DataType attribute, column attribute is used
My model now looks like this:
[column (typename = "date")] public date time? Requested expiration date {Received; Set; } If anyone is trying to do something similar, although I have used the TypeName = "date" , you should type TypeName whatever you want is a valid SQL Server data type.
Comments
asp.net प्रोग्रामिंग कोडर के लिए नमूने
ReplyDeleteएक फ़ोल्डर नमूना कोड में फ़ाइलों के विभिन्न फ़ाइल गुण प्रदर्शित करें