I have Subscribers table in the DB which cantains DateCreate field that has default value GetDate(). When I try to add new record to the table via Entity Framework:
Subscribers subs = new Subscribers();
subs.Email = email;
subs.DateCreate = DateTime.Now;
DataBase.DBContext.AddToSubscribers(subs);
DataBase.DBContext.SaveChanges();
it throws an exception: SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Who can help me? Thanks.
Date
property in your transaction? the code seems fine – sebagomez Feb 23 '12 at 15:04