Click here to Skip to main content
15,879,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Team,

I have to create MVC 3 project with Entity framework and Sql Server 2008.
When I Insert the New record with below Code

       return RedirectToAction("ViewSupplier");

Then I got the below Error
The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.\r\nThe statement has been terminated

In my table There is Datetime Column in domainMaster Table that are nullable.
Please help me for the same

Ravi Sharma
Updated 29-Aug-13 0:43am
Jameel VM 29-Aug-13 6:25am    
can you post the student entity class code?
Ravi Sharma 2 29-Aug-13 6:54am    
public class DomainMasters
public string intDomainId { get; set; }
public string nvcrDomainName { get; set; }
public string SupplierName { get; set; }
public string SupplierURL { get; set; }
public string ProxyGroup { get; set; }
Jameel VM 29-Aug-13 8:05am    
where is the date property?
Mahend_IT 29-Dec-15 10:42am    
Hitesh Gohel 29-Aug-13 6:36am    
Hi Ravi,
please write your post event whole code so can give suggestion for that.

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900