I get the following error message when running a LINQ statement to return a User object:
The 'LastLogin' property on 'User' could not be set to a 'null' value. You must set this property to a non-null value of type 'DateTime'.
The User class is generated by Entity Framework. How does one handle setting properties from database fields that are NULL?
Dim user As User = rep.Users.FirstOrDefault(Function(x) x.Username = userName)
The above line of code is the line that errors.
Thanks for any help
View Complete Post