sql server - EF6 (6.1.3/ net45) Logging feature does not seem to work -
when attempt run line: mydbcontext.database.log = console.write compiler smiles , tells me don't know doing...
the app won't compile because of line , error on line is: overload resolution failed because no accessible write accepts number of arguments.
that makes sense. 'console.write' returns nothing , setting equal system.action(of string)
this seems kind of half baked. tried numerous ways fix including delegates, , of other 'new possibilities' moving off context supposed offer still no dice. missing? changed @ last minute?
i have 2 large edmx files (one connects sql server , other oracle) in solution , of working great. here version numbers if can help. entityframework 6.0.0.0 (folder ...\entityframework.6.1.3\lib\net45\entityframework.dll) entityframework.sqlserver 6.0.0.0 (folder ...\entityframework.6.1.3\lib\net45\entityframework.dll) oracle.manageddataaccess.entityframework 6.121.2.0
i have tool created lets me paste output of l2s 'mycontext.log' , parses , creates ssms ready sql variables... has been incredibly useful. has been 1 of favorite features of l2s. please me understand why isn't working. in advance.
this technique works me:
public override int savechanges() { setistateinfo(); #if debug database.log = s => debug.writeline(s); #endif return base.savechanges(); }
Comments
Post a Comment