I want to save null value for dateTime field if the DateEdit (dev express C# windows application control) editvalue is null.
If dateEdit Control has a edit value it save the selected date.If its is null it save a default date But i want to save Null value if the dateEdit value is null.
SAmple COde: i am using entity frame work,
Orders ord= new Orders();
ord.OrderDate= dateEdit1.DateTime;**//here i want to save null value if the dateEdit control value is null**
Objcontext.Orders.AddObject(ord);
Objcontext.SaveChanges();

DateTime?orNullable<DateTime>(this is two different ways of writing the same thing). I don't know Entity Framework well enough to advise you on how to achieve that. Once you have achieved that, set the property with thenullkeyword, like this:ord.OrderDate = null;