thanks guys for your helpful comments.
The problem wast That I was fetching device
object from DB which has a property LastActivityDate
List<Device> devices = session.QueryOver<Data.Model.Device>().List().ToList();
I had added this property to model after addding a device object with some info to the DB. this property was null, but I haden't defined LastActivityDate as a nullable property.
so this object was in the same session of app object. when I flushed the session, because LastActivityDate
was null, SqlDateTime exception rised!
it's simple. but I spend hours to find it!!