linqtosql referenced entities pitch nullreferenceexception
i have unequivocally engaging problem linqtosql model. tables i have references tables linqtosql represented enitiyref class, perplexing opening references list linqtosql bucket anxiety database.
on growth accessory all worked glorious (the references hallowed perfectly) nonetheless final night i uploaded altered the prolongation server started removing nullreferenceexceptions perplexing opening anxiety tables.
sample code:
var sale = db.sales.single(s => s.id == 1);
string username = sale.user.name; // user anxiety user table
// linqtosql automatically bucket the
// quarrel opening fields i need.
// server sale.user throws an difference the zero (user) nonetheless user
// definitly database (there even fk imprisonment sale user)
at initial i guess datacontext got gc'd nonetheless i double checked all outcome (besides works box).
(everything same server box, same dll's, same db schema etc...)
(i indeed copied whole dbf record over server the accurate same schema)
Comments
Post a Comment